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 TypeMethodDescriptionint
getInternalChannelSize
(String channelName) Get the size of the internal channel(including the one being sent in the buffer) NOTE: currently only supported in RPCint
getSignalChannelSize
(String channelName) Get the size of the signal channel(including the one being sent in the buffer) NOTE: currently only supported in RPCvoid
publishInternalChannel
(String channelName, Object value) Publish a value to an internal Channelvoid
triggerStateMovements
(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:Communication
Get the size of the internal channel(including the one being sent in the buffer) NOTE: currently only supported in RPC- Specified by:
getInternalChannelSize
in interfaceCommunication
- Parameters:
channelName
- the channel name to get size- Returns:
- the size of the internal channel
-
getSignalChannelSize
Description copied from interface:Communication
Get the size of the signal channel(including the one being sent in the buffer) NOTE: currently only supported in RPC- Specified by:
getSignalChannelSize
in interfaceCommunication
- Parameters:
channelName
- the channel name to get size- Returns:
- the size of the signal channel
-
publishInternalChannel
Description copied from interface:Communication
Publish a value to an internal Channel- Specified by:
publishInternalChannel
in interfaceCommunication
- Parameters:
channelName
- the channel name to send valuevalue
- the value to be sent
-
triggerStateMovements
Description copied from interface:Communication
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- Specified by:
triggerStateMovements
in interfaceCommunication
- Parameters:
stateMovements
- the state movements to trigger
-
getToPublishInternalChannels
-
getStateMovements
-