com.sun.messaging.jms.management.server

## Class BrokerNotification

- java.lang.Object
- - java.util.EventObject
  - - javax.management.Notification
    - - com.sun.messaging.jms.management.server.MQNotification
      - - com.sun.messaging.jms.management.server.BrokerNotification

All Implemented Interfaces:
  Serializable

    public class BrokerNotification
    extends MQNotification

Class containing information on broker related notifications. This notification is broadcasted from the relevant MBeans in a broker that is either:

- in the process of quiescing
- in the process of shutting down
- in the process of taking over another broker's persistence store

With regards to the takeover related notifications, this notification is broadcasted by the broker that is performing the takeover operation, not the broker that is being taken over.

See Also:
  Serialized Form

### Field Summary

Fields
`static String` `BROKER_QUIESCE_COMPLETE` A broker has finished quiescing.
`static String` `BROKER_QUIESCE_START` A broker has started to quiesce.
`static String` `BROKER_RESOURCE_STATE_CHANGE` A broker's memory level/state has changed
`static String` `BROKER_SHUTDOWN_START` A broker has started the process of shutting down.
`static String` `BROKER_TAKEOVER_COMPLETE` A broker has completed the takeover of another broker.
`static String` `BROKER_TAKEOVER_FAIL` A broker has failed in the attempt to takeover another broker.
`static String` `BROKER_TAKEOVER_START` A broker has started to takeover another broker.

### Fields inherited from class com.sun.messaging.jms.management.server.MQNotification

`PREFIX`

### Fields inherited from class javax.management.Notification

`source`

### Constructor Summary

Constructors
Constructor and Description
`BrokerNotification(String type, Object source, long sequenceNumber)` Creates a BrokerNotification object.

### Method Summary

Methods
`String` `getBrokerAddress()` Returns the broker address.
`String` `getBrokerID()` Returns the broker ID.
`String` `getFailedBrokerID()` Returns the ID of the broker in the cluster that failed and is in the process of being taken over.
`MemoryUsage` `getHeapMemoryUsage()`
`String` `getNewResourceState()`
`String` `getOldResourceState()`
`void` `setBrokerAddress(String brokerAddress)` Sets the broker address.
`void` `setBrokerID(String brokerID)` Sets the broker ID.
`void` `setFailedBrokerID(String failedBrokerID)` Sets the ID of the broker in the cluster that failed and is in the process of being taken over.
`void` `setHeapMemoryUsage(MemoryUsage heapMemoryUsage)`
`void` `setNewResourceState(String newResourceState)`
`void` `setOldResourceState(String oldResourceState)`

### Methods inherited from class javax.management.Notification

`getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString`

### Methods inherited from class java.util.EventObject

`getSource`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### BROKER_RESOURCE_STATE_CHANGE

    public static final String BROKER_RESOURCE_STATE_CHANGE

A broker's memory level/state has changed

See Also:
  Constant Field Values

#### BROKER_QUIESCE_COMPLETE

    public static final String BROKER_QUIESCE_COMPLETE

A broker has finished quiescing.

See Also:
  Constant Field Values

#### BROKER_QUIESCE_START

    public static final String BROKER_QUIESCE_START

A broker has started to quiesce.

See Also:
  Constant Field Values

#### BROKER_SHUTDOWN_START

    public static final String BROKER_SHUTDOWN_START

A broker has started the process of shutting down.

See Also:
  Constant Field Values

#### BROKER_TAKEOVER_COMPLETE

    public static final String BROKER_TAKEOVER_COMPLETE

A broker has completed the takeover of another broker.

See Also:
  Constant Field Values

#### BROKER_TAKEOVER_FAIL

    public static final String BROKER_TAKEOVER_FAIL

A broker has failed in the attempt to takeover another broker.

See Also:
  Constant Field Values

#### BROKER_TAKEOVER_START

    public static final String BROKER_TAKEOVER_START

A broker has started to takeover another broker.

See Also:
  Constant Field Values

### Constructor Detail

#### BrokerNotification

    public BrokerNotification(String type,
                      Object source,
                      long sequenceNumber)

Creates a BrokerNotification object.

Parameters:
  `type` - The notification type.
  `source` - The notification source.
  `sequenceNumber` - The notification sequence number within the source object.

### Method Detail

#### setBrokerID

    public void setBrokerID(String brokerID)

Sets the broker ID. Depending on the type of notification, this can be the ID of the broker that is quiescing, shutting down, or the ID of the broker that is taking over another broker's persistence store.

Parameters:
  `brokerID` - The broker ID.

#### getBrokerID

    public String getBrokerID()

Returns the broker ID. Depending on the type of notification, this can be the ID of the broker that is quiescing, shutting down, or the ID of the broker that is taking over another broker's persistence store.

Returns:
  The broker ID.

#### setBrokerAddress

    public void setBrokerAddress(String brokerAddress)

Sets the broker address. Depending on the type of notification, this can be the address of the broker that is quiescing, shutting down, or the address of the broker that is taking over another broker's persistence store.

Parameters:
  `brokerAddress` - The broker address.

#### getBrokerAddress

    public String getBrokerAddress()

Returns the broker address. Depending on the type of notification, this can be the address of the broker that is quiescing, shutting down, or the address of the broker that is taking over another broker's persistence store.

Returns:
  The broker address.

#### setFailedBrokerID

    public void setFailedBrokerID(String failedBrokerID)

Sets the ID of the broker in the cluster that failed and is in the process of being taken over.

Parameters:
  `failedBrokerID` - Sets the ID of the broker in the cluster that failed and is in the process of being taken over.

#### getFailedBrokerID

    public String getFailedBrokerID()

Returns the ID of the broker in the cluster that failed and is in the process of being taken over.

Returns:
  Sets the ID of the broker in the cluster that failed and is in the process of being taken over.

#### setOldResourceState

    public void setOldResourceState(String oldResourceState)

#### getOldResourceState

    public String getOldResourceState()

#### setNewResourceState

    public void setNewResourceState(String newResourceState)

#### getNewResourceState

    public String getNewResourceState()

#### setHeapMemoryUsage

    public void setHeapMemoryUsage(MemoryUsage heapMemoryUsage)

#### getHeapMemoryUsage

    public MemoryUsage getHeapMemoryUsage()