com.sun.jdmk.discovery
Class DiscoveryResponderNotification

java.lang.Object
  extended by java.util.EventObject
      extended by javax.management.Notification
          extended by com.sun.jdmk.discovery.DiscoveryResponderNotification
All Implemented Interfaces:
Serializable

public class DiscoveryResponderNotification
extends Notification

The DiscoveryResponderNotification object is sent by the DiscoveryMonitor MBean to its listener. The DiscoveryResponderNotification object is sent by the DiscoveryMonitor when it receives a registration or unregistration message from a DiscoveryResponder.

See Also:
Serialized Form

Field Summary
static String REGISTRATION
          Notification type denoting that the DiscoveryResponder MBean has been registered or unregistered from the MBeanServer.
 
Fields inherited from class javax.management.Notification
source
 
Constructor Summary
DiscoveryResponderNotification(DiscoveryMonitor source, int state, DiscoveryResponse agtDes, long sequenceNumber)
          Constructs a DiscoveryResponderNotification.
 
Method Summary
 DiscoveryResponse getEventInfo()
          Returns the hostname and the MBeanServer information of the agent.
 Integer getState()
          Returns the state of the agent.
 
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

REGISTRATION

public static final String REGISTRATION
Notification type denoting that the DiscoveryResponder MBean has been registered or unregistered from the MBeanServer.
The value of this notification type is com.sun.jdmk.discovery.

See Also:
Constant Field Values
Constructor Detail

DiscoveryResponderNotification

public DiscoveryResponderNotification(DiscoveryMonitor source,
                                      int state,
                                      DiscoveryResponse agtDes,
                                      long sequenceNumber)
Constructs a DiscoveryResponderNotification.

Parameters:
source - The object that was registered or the object on which the event occurred.
state - Indicates whether a DiscoveryResponder object has been added to an agent (DiscoveryMonitor.ONLINE) or removed (DiscoveryMonitor.OFFLINE).
agtDes - This parameter gives information about the agent.
sequenceNumber - The notification sequence number within the DiscoveryResponder MBean object.
Method Detail

getState

public Integer getState()
Returns the state of the agent.

If the state is DiscoveryMonitor.ONLINE, a DiscoveryResponder object has been added to an agent. If the state is DiscoveryMonitor.OFFLINE, a DiscoveryResponder object has been removed from an agent. The getEventInfo method provides additional information on the agent.

Returns:
DiscoveryMonitor.ONLINE or DiscoveryMonitor.OFFLINE

getEventInfo

public DiscoveryResponse getEventInfo()
Returns the hostname and the MBeanServer information of the agent. It also returns a list of communicators ( see DiscoveryResponse description).

If state is DiscoveryMonitor.OFFLINE, only the host and MBeanServer information are significant in the DiscoveryResponse object.

Returns:
A DiscoveryResponse object. This object contains the hostname as a string host and MBeanServer information. It also contains a list of communicators ( see DiscoveryResponse description) if the state is DiscoveryMonitor.ONLINE.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.