com.sun.messaging.jms.notification (Message Queue, 5.1 API Specification)
Date: 2019-01-27

# Package com.sun.messaging.jms.notification

Provides a notification API for the MQ client runtime to inform an application about a MQ connection state changes.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  EventListener | An event listener object is used to receive asynchronously delivered MQ events.

- Class Summary
  Class | Description
  --- | ---
  ConnectionClosedEvent | MQ Connection closed Event.
  ConnectionClosingEvent | MQ Connection closing Event.
  ConnectionEvent | MQ Connection Event.
  ConnectionReconnectedEvent | MQ Connection Reconnected Event is generated and delivered to the event listener if the MQ client runtime reconnected to a broker and an event listener is set to the MQ connection.
  ConnectionReconnectFailedEvent | MQ Connection Reconnect Failed Event is generated and delivered to the event listener if a MQ reconnect failed and an event listener is set to the MQ connection.
  ConsumerEvent | MQ Consumer Event.
  Event | MQ Event.

## Package com.sun.messaging.jms.notification Description

Provides a notification API for the MQ client runtime to inform an application about a MQ connection state changes.

The current notification types defined for the MQ 4.0 release are as follows:

- Connection closing event. A connection closing event is generated and delivered to the event listener if the broker is about to close a MQ connection (such as admin requested shutdown) and an event listener is set to the MQ connection.
- Connection closed event. A connection closed event is generated and delivered to the event listener if the broker closed a MQ connection (such as admin requested shutdown, restart, out of memory, etc.) and an event listener is set to the MQ connection.
- Connection reconnected event. A connection reconnected event is generated and delivered to the event listener if the MQ client runtime reconnected to a broker and an event listener is set to the MQ connection.
- Connection reconnect failed event. A connection reconnect failed event is generated and delivered to the event listener if a reconnect attempt to a broker failed and an event listener is set to the MQ connection. (MQ client runtime will retry base on the reconnect contract).

A MQ application sets a connection event listener in order to be notified for the MQ events. The API to set the notification listener is defined in the `com.sun.messaging.jms.Connection` class.

See Also:
  `com.sun.messaging.jms`

Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.