javax.slee.management
Class ResourceAdaptorEntityStateChangeNotification

java.lang.Object
  extended by java.util.EventObject
      extended by javax.management.Notification
          extended by javax.slee.management.ResourceAdaptorEntityStateChangeNotification
All Implemented Interfaces:
java.io.Serializable, VendorExtensions

public final class ResourceAdaptorEntityStateChangeNotification
extends javax.management.Notification
implements VendorExtensions

This notification is emitted by a ResourceManagementMBean object to indicate a change in the operational state of a resource adaptor entity.

The notification type of resource adaptor entity state change notifications is specified by the ResourceManagementMBean.RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE attribute.

Since:
SLEE 1.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.management.Notification
source
 
Constructor Summary
ResourceAdaptorEntityStateChangeNotification(ResourceManagementMBean resourceManagementMBean, java.lang.String entityName, ResourceAdaptorEntityState newState, ResourceAdaptorEntityState oldState, long sequenceNumber)
          Create a ResourceAdaptorEntityStateChangeNotification to notify listeners of a change in the operational state of a resource adaptor entity.
 
Method Summary
static void disableVendorDataDeserialization()
          Disable the deserialization of vendor-specific data for objects of this class.
static void disableVendorDataSerialization()
          Disable the serialization of vendor-specific data for objects of this class.
static void enableVendorDataDeserialization()
          Enable the deserialization of vendor-specific data for objects of this class.
static void enableVendorDataSerialization()
          Enable the serialization of vendor-specific data for objects of this class.
 java.lang.String getEntityName()
          Get the name of the resource adaptor entity that has changed state.
 ResourceAdaptorEntityState getNewState()
          Get the new operational state of the resource adaptor entity.
 ResourceAdaptorEntityState getOldState()
          Get the state the resource adaptor entity was in before the change to the new state.
 java.lang.Object getVendorData()
          Get the vendor-specific data.
 void setVendorData(java.lang.Object vendorData)
          Set the vendor-specific data.
 java.lang.String toString()
          Get a string representation for this notification.
 
Methods inherited from class javax.management.Notification
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData
 
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
 

Constructor Detail

ResourceAdaptorEntityStateChangeNotification

public ResourceAdaptorEntityStateChangeNotification(ResourceManagementMBean resourceManagementMBean,
                                                    java.lang.String entityName,
                                                    ResourceAdaptorEntityState newState,
                                                    ResourceAdaptorEntityState oldState,
                                                    long sequenceNumber)
                                             throws java.lang.NullPointerException
Create a ResourceAdaptorEntityStateChangeNotification to notify listeners of a change in the operational state of a resource adaptor entity. Notifications are broadcast after the resource adaptor entity has changed to the new state.

Parameters:
resourceManagementMBean - the ResourceManagementMBean object that is emitting this notification.
entityName - the name of the resource adaptor entity that has changed state.
newState - the new operational state of the resource adaptor entity.
oldState - the old operational state of the resource adaptor entity.
sequenceNumber - the notification sequence number within the source ResourceManagementMBean object.
Throws:
java.lang.NullPointerException - if notificationSource, entityName, newState, or oldState is null.
Method Detail

getEntityName

public java.lang.String getEntityName()
Get the name of the resource adaptor entity that has changed state.

Returns:
the resource adaptor entity name.

getNewState

public ResourceAdaptorEntityState getNewState()
Get the new operational state of the resource adaptor entity.

Returns:
the new state.

getOldState

public ResourceAdaptorEntityState getOldState()
Get the state the resource adaptor entity was in before the change to the new state.

Returns:
the old state.

enableVendorDataSerialization

public static void enableVendorDataSerialization()
Enable the serialization of vendor-specific data for objects of this class. This method is typically used by a SLEE implementation that wants to export vendor-specific data with objects of this class to management clients.

By default, any vendor-specific data included in an object of this class will not be included in the serialization stream when the object is serialized. Invoking this method changes this behavior so that vendor-specific data is included in the serialization stream when an object of this class is serialized.

This method should only be invoked if the vendor-specific data is serializable via standard Java serialization means.

See Also:
disableVendorDataSerialization(), setVendorData(java.lang.Object)

disableVendorDataSerialization

public static void disableVendorDataSerialization()
Disable the serialization of vendor-specific data for objects of this class.

If the serialization of vendor-specific data for objects of this class has been enabled via the enableVendorDataSerialization() method, this method disables that behavior again.


enableVendorDataDeserialization

public static void enableVendorDataDeserialization()
Enable the deserialization of vendor-specific data for objects of this class. This method is typically used by a management client that wants to obtain any vendor-specific data included in the serialization stream of objects of this class.

By default, any vendor-specific data included in the serialization stream of objects of this class is discarded upon deserialization. Invoking this method changes that behavior so that the vendor-specific data is also deserialized when an object of this class is deserialized. A management client that enables the deserialization of vendor-specific data must ensure that any necessary classes required to deserialize that data is available in the relevant classloader.

See Also:
disableVendorDataDeserialization(), getVendorData()

disableVendorDataDeserialization

public static void disableVendorDataDeserialization()
Disable the deserialization of vendor-specific data for objects of this class.

If the deserialization of vendor-specific data for objects of this class has been enabled via the enableVendorDataDeserialization() method, this method disables that behavior again.


setVendorData

public void setVendorData(java.lang.Object vendorData)
Set the vendor-specific data.

Specified by:
setVendorData in interface VendorExtensions
Parameters:
vendorData - the vendor-specific data.

getVendorData

public java.lang.Object getVendorData()
Get the vendor-specific data.

Specified by:
getVendorData in interface VendorExtensions
Returns:
the vendor-specific data.

toString

public java.lang.String toString()
Get a string representation for this notification.

Overrides:
toString in class javax.management.Notification
Returns:
a string representation for this notification.


Copyright © 2009. All Rights Reserved.