Collapse All Expand All

.NET Framework Class Library
Tibems Class See Also

[TIBCO.EMS .NET client library 6.0 documentation]

The multicast exception event handler

Namespace: TIBCO.EMS
Assembly: TIBCO.EMS (in TIBCO.EMS.dll)

# Syntax

    public static event EMSMulticastExceptionHandler MulticastExceptionHandler

    Public Shared Event MulticastExceptionHandler As EMSMulticastExceptionHandler

    public:
    static  event EMSMulticastExceptionHandler^ MulticastExceptionHandler {
    	void add (EMSMulticastExceptionHandler^ value);
    	void remove (EMSMulticastExceptionHandler^ value);
    }

# Remarks

The client library raises an event if it detects a problem with EMS multicast. The program implements a handler delegate to processes it asynchronously and registers the delegate here.

Delegate declaration for multicast exception handler is as follows:

| Copy Code
--- | ---
                public delegate void EMSMulticastExceptionHandler(object sender, EMSExceptionEventArgs args);

                sender: The source of the event, the connection in this case.

                args: The event argument, EMSExceptionEventArgs

# Examples

Example of using the exception event handler:

| Copy Code
--- | ---
                ...
                Tibems.MulticastExceptionHandler += new EMSMulticastExceptionHandler(handleEx);
                ...
                private void handleEx(object sender, EMSExceptionEventArgs arg)
                {
                   Connection   connection = arg.Connection;
                   Session      session    = arg.Session;
                   Consumer     consumer   = arg.Consumer;
                   EMSException e          = arg.Exception;
                   Console.WriteLine("Exception: " + e.Message);
                }
                ...

# See Also

Tibems Class
TIBCO.EMS Namespace