Class ConsumerEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.sun.messaging.jms.notification.Event
-
- com.sun.messaging.jms.notification.ConsumerEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ConsumerEvent extends Event
MQ Consumer Event.- Since:
- 4.5
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONSUMER_NOT_READYNo consumer event codestatic java.lang.StringCONSUMER_READYConsumer ready event code
-
Constructor Summary
Constructors Constructor Description ConsumerEvent(Destination dest, Connection conn, java.lang.String evCode, java.lang.String evMessage)Construct a MQ consumer event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBrokerAddress()Get the broker's address that sent the event.ConnectiongetConnection()Get the connection on which the event was received.DestinationgetDestination()Get the registered destination on which the event was occurred.-
Methods inherited from class com.sun.messaging.jms.notification.Event
getEventCode, getEventMessage, toString
-
-
-
-
Field Detail
-
CONSUMER_READY
public static final java.lang.String CONSUMER_READY
Consumer ready event code- See Also:
- Constant Field Values
-
CONSUMER_NOT_READY
public static final java.lang.String CONSUMER_NOT_READY
No consumer event code- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConsumerEvent
public ConsumerEvent(Destination dest, Connection conn, java.lang.String evCode, java.lang.String evMessage)
Construct a MQ consumer event.destis theDestinationobject that was passed inConnection.setConsumerEventListener(com.sun.messaging.Destination, com.sun.messaging.jms.notification.EventListener)and is what will be returned bygetDestination()connis theConnectionon which this event was received and is what will be returned bygetConnection()evCodeis what will be returned byEvent.getEventCode()which can be eitherCONSUMER_READYorCONSUMER_NOT_READYevMessageis a description of theevCodeand is what will be returned byEvent.getEventMessage()- Parameters:
dest- the destination on which the event occurred.conn- the connection on which the event was receivedevCode- the event code that represents this event object.evMessage- the event message that describes this event object.
-
-
Method Detail
-
getConnection
public Connection getConnection()
Get the connection on which the event was received.- Returns:
- the connection on which the event was received.
-
getBrokerAddress
public java.lang.String getBrokerAddress()
Get the broker's address that sent the event.- Returns:
- the broker's address that sent the event
-
getDestination
public Destination getDestination()
Get the registered destination on which the event was occurred.- Returns:
- the registered destination on which the event was occurred.
-
-