10.24.0

ISessionCreateFlow(FlowProperties, IEndpoint, ISubscription, EventHandlerMessageEventArgs, EventHandlerFlowEventArgs, EndpointProperties) Method

Creates IFlow instances. In addition, if endPoint is a non-durable Endpoint, it is possible to specify the EndpointProperties of implicitly created Endpoint on the appliance.

The message receive delegate is invoked for each received message on this flow. The flow event delegate is invoked when flow events occur, such as the flow going up or down. Both delegates are invoked in the context of the context thread to which this session belongs.

Note: disposing the corresponding context (IContext) or any of its contained context timers (TimerTask), sessions (ISession) or flows (IFlow) must not be performed from within the registered delegates (messageEventHandler or flowEventHandler).

Definition

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.24.0
C#
IFlow CreateFlow(
	FlowProperties flowProperties,
	IEndpoint endPoint,
	ISubscription subscription,
	EventHandler<MessageEventArgs> messageEventHandler,
	EventHandler<FlowEventArgs> flowEventHandler,
	EndpointProperties endPointProperties
)

Parameters

flowProperties  FlowProperties
FlowProperties
endPoint  IEndpoint
The IEndpoint instance to bind the new IFlow to.
subscription  ISubscription
Only valid if endpoint is of type ITopicEndpoint.
messageEventHandler  EventHandlerMessageEventArgs
The message EventHandler delegate.
flowEventHandler  EventHandlerFlowEventArgs
The flow event EventHandler delegate.

Client applications can call GetLastSDKErrorInfo from within the flow event delegate to get more info on the type of error condition reported by FlowEventArgs.

endPointProperties  EndpointProperties
the EndpointProperties of the implicitly created Endpoint on the appliance, endPoint must be durable, otherwise these properties are ignored. Use null to accept default properties.

Return Value

IFlow
An IFlow instance that is already started, unless FlowStartState is set to false.

Exceptions

OperationErrorException Thrown when the operation fails. Possible sub-codes:
ObjectDisposedException Thrown when the session is already disposed (terminal state).
FatalErrorException Thrown when an unrecoverable error occurs.
ArgumentNullException Thrown if any of the required parameters is null.
ArgumentException Thrown if arguments fail validation.

See Also