ISession.CreateFlow Method (FlowProperties, IEndpoint, ISubscription, EventHandler(MessageEventArgs), EventHandler(FlowEventArgs), EndpointProperties)

Solclient

ISessionCreateFlow Method (FlowProperties, IEndpoint, ISubscription, EventHandlerMessageEventArgs, EventHandlerFlowEventArgs, EndpointProperties)
version: 7.2.1.27
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).

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
IFlow CreateFlow(
	FlowProperties flowProperties,
	IEndpoint endPoint,
	ISubscription subscription,
	EventHandler<MessageEventArgs> messageEventHandler,
	EventHandler<FlowEventArgs> flowEventHandler,
	EndpointProperties endPointProperties
)
Function CreateFlow ( 
	flowProperties As FlowProperties,
	endPoint As IEndpoint,
	subscription As ISubscription,
	messageEventHandler As EventHandler(Of MessageEventArgs),
	flowEventHandler As EventHandler(Of FlowEventArgs),
	endPointProperties As EndpointProperties
) As IFlow
IFlow^ CreateFlow(
	FlowProperties^ flowProperties, 
	IEndpoint^ endPoint, 
	ISubscription^ subscription, 
	EventHandler<MessageEventArgs^>^ messageEventHandler, 
	EventHandler<FlowEventArgs^>^ flowEventHandler, 
	EndpointProperties^ endPointProperties
)

Parameters

flowProperties
Type: SolaceSystems.Solclient.MessagingFlowProperties
FlowProperties
endPoint
Type: SolaceSystems.Solclient.MessagingIEndpoint
The IEndpoint instance to bind the new IFlow to.
subscription
Type: SolaceSystems.Solclient.MessagingISubscription
Only valid if endpoint is of type ISubscriberEndpoint.
messageEventHandler
Type: SystemEventHandlerMessageEventArgs
The message EventHandler delegate.
flowEventHandler
Type: SystemEventHandlerFlowEventArgs
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
Type: SolaceSystems.Solclient.MessagingEndpointProperties
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

Type: IFlow
An IFlow instance that is already started, unless FlowStartState is set to false.
Exceptions
ExceptionCondition
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