Class AQNotificationEvent

java.lang.Object
java.util.EventObject
oracle.jdbc.aq.AQNotificationEvent
All Implemented Interfaces:
Serializable

public abstract class AQNotificationEvent extends EventObject
An AQNotificationEvent will be created whenever a new message is enqueued in a queue for which you have registered your interest (see OracleConnection.registerAQNotification).

The AQNotificationEvent provides information about the new message that has been enqueued.

See Also:
  • Constructor Details

    • AQNotificationEvent

      protected AQNotificationEvent(Object source)
  • Method Details

    • getMessageProperties

      public abstract AQMessageProperties getMessageProperties() throws SQLException
      Retrieves the properties of the new message.
      Throws:
      SQLException
    • getRegistration

      public abstract String getRegistration() throws SQLException
      Retrieves the registration name which is the name that you provided when you registered for AQ notification with the registerAQNotification method.

      In the case of a single consumer queue, the registration name is the name of the queue whereas in the case of a multi-consumer queue, it's the name of the queue plus the name of the consumer ("SCOTT.MY_QUEUE:RECEIVER").

      Throws:
      SQLException
    • getPayload

      public abstract byte[] getPayload() throws SQLException
      Retrieves the payload of the new message. Note that this feature only works with RAW queues and that it needs to be activated with the OracleConnection.NTF_AQ_PAYLOAD option during registration.
      Throws:
      SQLException
    • getQueueName

      public abstract String getQueueName() throws SQLException
      Retrieves the name of the queue.
      Throws:
      SQLException
    • getMessageId

      public abstract byte[] getMessageId() throws SQLException
      Retrieves the ID of the new message.
      Throws:
      SQLException
    • getConsumerName

      public abstract String getConsumerName() throws SQLException
      Retrieves the name of the consumer. In the case of a multi-consumer queue, this retrieves the name of the consumer upon which you register for AQ notification.
      Throws:
      SQLException
    • getConnectionInformation

      public abstract String getConnectionInformation()
      Retrieves a description of the TCP connection on which the notification was received.
    • getEventType

      public abstract AQNotificationEvent.EventType getEventType()
      Retrieve the event type.
    • getAdditionalEventType

      public abstract AQNotificationEvent.AdditionalEventType getAdditionalEventType()
      Retrieve the additional event type.
    • toString

      public abstract String toString()
      Overrides:
      toString in class EventObject