IMessageDispatcher.CreateDispatchTarget Method

Solclient

IMessageDispatcherCreateDispatchTarget Method
version: 7.2.1.27
Creates a IDispatchTarget instance to be used in the Subscribe(IDispatchTarget, Int32, Object) and Unsubscribe(IDispatchTarget, Int32, Object) methods.

Note: Client applications must keep IDispatchTarget object references accessible if they want to Unsubscribe from the given IMessageDispatcher, and remove already added Topic subscriptions. IDispatchTarget internal object ID constitutes a unique key. Forgetting to keep a reference to IDispatchTarget objects make subsequent Unsubscribe(IDispatchTarget, Int32, Object) calls impossible.

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
IDispatchTarget CreateDispatchTarget(
	ISubscription subscription,
	EventHandler<MessageEventArgs> messageCallback
)
Function CreateDispatchTarget ( 
	subscription As ISubscription,
	messageCallback As EventHandler(Of MessageEventArgs)
) As IDispatchTarget
IDispatchTarget^ CreateDispatchTarget(
	ISubscription^ subscription, 
	EventHandler<MessageEventArgs^>^ messageCallback
)

Parameters

subscription
Type: SolaceSystems.Solclient.MessagingISubscription
An ITopic instance.
messageCallback
Type: SystemEventHandlerMessageEventArgs
The callback delegate to dispatch matching messages to.

Return Value

Type: IDispatchTarget
Returns a IDispatchTarget instance
Exceptions
ExceptionCondition
ObjectDisposedException Thrown when the session is already disposed (terminal state).
ArgumentNullException Thrown if subscription or messageCallback are null.
ArgumentOutOfRangeException
See Also