-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
It seems strange to me that I have to resort to the specific version of the method for each type if they can have a common base class that can be used and no difference in the implementation.
The methods:
protected void publishPhysicalAssetPropertyWldtEvent(PhysicalAssetPropertyWldtEvent<?> targetPhysicalPropertyEventMessage) throws EventBusException {
WldtEventBus.getInstance().publishEvent(this.digitalTwinId, this.getId(), targetPhysicalPropertyEventMessage);
}
protected void publishPhysicalAssetEventWldtEvent(PhysicalAssetEventWldtEvent<?> targetPhysicalAssetEventWldtEvent) throws EventBusException {
WldtEventBus.getInstance().publishEvent(this.digitalTwinId, this.getId(), targetPhysicalAssetEventWldtEvent);
}
protected void publishPhysicalAssetRelationshipCreatedWldtEvent(PhysicalAssetRelationshipInstanceCreatedWldtEvent<?> targetPhysicalAssetRelationshipWldtEvent) throws EventBusException {
WldtEventBus.getInstance().publishEvent(this.digitalTwinId, this.getId(), targetPhysicalAssetRelationshipWldtEvent);
}
protected void publishPhysicalAssetRelationshipDeletedWldtEvent(PhysicalAssetRelationshipInstanceDeletedWldtEvent<?> targetPhysicalAssetRelationshipWldtEvent) throws EventBusException {
WldtEventBus.getInstance().publishEvent(this.digitalTwinId, this.getId(), targetPhysicalAssetRelationshipWldtEvent);
}are all the same, we could simplify with only one method for the Physical Adapters.
This would enable the publishing of a generic event without knowing in advance its type which might come in handy for some situations.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested