Package io.iworkflow.core.communication
Class CommunicationImpl
java.lang.Object
io.iworkflow.core.communication.CommunicationImpl
- All Implemented Interfaces:
Communication
-
Constructor Summary
ConstructorsConstructorDescriptionCommunicationImpl(Map<String, ChannelInfo> internalChannelInfos, Map<String, ChannelInfo> signalChannelInfos, TypeStore internalChannelTypeStore, TypeStore signalChannelTypeStore, ObjectEncoder objectEncoder, boolean allowTriggerStateMovements) -
Method Summary
Modifier and TypeMethodDescriptionintgetInternalChannelSize(String channelName) Get the size of the internal channel(including the one being sent in the buffer) NOTE: currently only supported in RPCintgetSignalChannelSize(String channelName) Get the size of the signal channel(including the one being sent in the buffer) NOTE: currently only supported in RPCvoidpublishInternalChannel(String channelName, Object value) Publish a value to an internal ChannelvoidtriggerStateMovements(StateMovement... stateMovements) trigger new state movements as the RPC results NOTE: closing workflows like completing/failing are not supported NOTE: Only used in RPC -- cannot be used in state APIs
-
Constructor Details
-
CommunicationImpl
public CommunicationImpl(Map<String, ChannelInfo> internalChannelInfos, Map<String, ChannelInfo> signalChannelInfos, TypeStore internalChannelTypeStore, TypeStore signalChannelTypeStore, ObjectEncoder objectEncoder, boolean allowTriggerStateMovements)
-
-
Method Details
-
getInternalChannelSize
Description copied from interface:CommunicationGet the size of the internal channel(including the one being sent in the buffer) NOTE: currently only supported in RPC- Specified by:
getInternalChannelSizein interfaceCommunication- Parameters:
channelName- the channel name to get size- Returns:
- the size of the internal channel
-
getSignalChannelSize
Description copied from interface:CommunicationGet the size of the signal channel(including the one being sent in the buffer) NOTE: currently only supported in RPC- Specified by:
getSignalChannelSizein interfaceCommunication- Parameters:
channelName- the channel name to get size- Returns:
- the size of the signal channel
-
publishInternalChannel
Description copied from interface:CommunicationPublish a value to an internal Channel- Specified by:
publishInternalChannelin interfaceCommunication- Parameters:
channelName- the channel name to send valuevalue- the value to be sent
-
triggerStateMovements
Description copied from interface:Communicationtrigger new state movements as the RPC results NOTE: closing workflows like completing/failing are not supported NOTE: Only used in RPC -- cannot be used in state APIs- Specified by:
triggerStateMovementsin interfaceCommunication- Parameters:
stateMovements- the state movements to trigger
-
getToPublishInternalChannels
-
getStateMovements
-