Class ConnectionClosedEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.sun.messaging.jms.notification.Event
-
- com.sun.messaging.jms.notification.ConnectionEvent
-
- com.sun.messaging.jms.notification.ConnectionClosedEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ConnectionClosedEvent extends ConnectionEvent
MQ Connection closed Event. This event is generated by MQ and delivered to an application (if the connection event listener is set) when a connection is closed by MQ.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONNECTION_CLOSED_BROKER_DOWN
Connection closed event code - broker crash.static java.lang.String
CONNECTION_CLOSED_ERROR
Connection closed event code - server error, e.g.static java.lang.String
CONNECTION_CLOSED_KILL
Connection closed event code - admin killed connection.static java.lang.String
CONNECTION_CLOSED_LOST_CONNECTION
The above event codes are for events originated from the broker.static java.lang.String
CONNECTION_CLOSED_NON_RESPONSIVE
Connection closed event code - broker is not responsive.static java.lang.String
CONNECTION_CLOSED_RESTART
Connection closed event code - admin requested restartstatic java.lang.String
CONNECTION_CLOSED_SHUTDOWN
Connection closed event code - admin requested shutdown-
Fields inherited from class com.sun.messaging.jms.notification.ConnectionEvent
connection
-
-
Constructor Summary
Constructors Constructor Description ConnectionClosedEvent(Connection conn, java.lang.String evCode, java.lang.String evMessage, jakarta.jms.JMSException jmse)
Construct a connection closed event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.jms.JMSException
getJMSException()
Get the JMSException that caused the connection to be closed.-
Methods inherited from class com.sun.messaging.jms.notification.ConnectionEvent
getBrokerAddress, getConnection, getSource
-
Methods inherited from class com.sun.messaging.jms.notification.Event
getEventCode, getEventMessage, toString
-
-
-
-
Field Detail
-
CONNECTION_CLOSED_SHUTDOWN
public static final java.lang.String CONNECTION_CLOSED_SHUTDOWN
Connection closed event code - admin requested shutdown- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_RESTART
public static final java.lang.String CONNECTION_CLOSED_RESTART
Connection closed event code - admin requested restart- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_ERROR
public static final java.lang.String CONNECTION_CLOSED_ERROR
Connection closed event code - server error, e.g. out of memory.- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_KILL
public static final java.lang.String CONNECTION_CLOSED_KILL
Connection closed event code - admin killed connection.- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_BROKER_DOWN
public static final java.lang.String CONNECTION_CLOSED_BROKER_DOWN
Connection closed event code - broker crash.- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_NON_RESPONSIVE
public static final java.lang.String CONNECTION_CLOSED_NON_RESPONSIVE
Connection closed event code - broker is not responsive.- See Also:
- Constant Field Values
-
CONNECTION_CLOSED_LOST_CONNECTION
public static final java.lang.String CONNECTION_CLOSED_LOST_CONNECTION
The above event codes are for events originated from the broker. Broker notifies MQ client runtime that the connection is closed. This event code is to represent that the MQ client runtime detects the connection to the broker is broken. This could be a network problem or broker crashed.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionClosedEvent
public ConnectionClosedEvent(Connection conn, java.lang.String evCode, java.lang.String evMessage, jakarta.jms.JMSException jmse)
Construct a connection closed event.- Parameters:
conn
- the connection that the event is associated with. MQ may automatically reconnect to the same broker or a different broker depends on the client runtime configuration.evCode
- the event code that represents this event object.evMessage
- the event message that describes this event object.jmse
- the JMSException that caused this event.
-
-
Method Detail
-
getJMSException
public jakarta.jms.JMSException getJMSException()
Get the JMSException that caused the connection to be closed.- Returns:
- the JMSException that caused the connection to be closed. return null if no JMSException associated with this event. Such as connection closed caused by admin requested shutdown.
-
-