All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.sun.jaw.impl.agent.services.jawdiscovery.DiscoveryResponder
DiscoveryResponder class implements the m-bean that
responds to the discovery requests. Any agent that needs to be discovered
must instantiate and register a DiscoveryResponder in its
framework.
When a DiscoveryResponder is registered in the framework,
or when performStart method is called, the m-bean
starts a thread which creates a multicast socket. The
DiscoveryResponder then sends a join message
to the multicast group.
When a DiscoveryResponder is deleted from the framework,
or when performStop method is called, the m-bean
sends a leave message to the multicast group. The format of these messages
is not exposed. These messages allow DiscoveryMonitor objects to
maintain a list of agents with DiscoveryResponder objects
registered in their frameworks.
When a DiscoveryResponder has registered in the framework
-or when performStart method is called - and a
join message has been sent, the DiscoveryResponder starts to listen for
discovery requests.
The multicast socket uses the group and port specified by the
properties multicastGroup and multicastPort.
The default values for the group and the port are 224.224.224.224 and
9000. These values can be changed when the
DiscoveryResponder is registered in the framework by
specifying the group and port keys in the
ObjectName.
These values can be also changed using setMulticastGroup and
setMulticastPort methods when the DiscoveryResponder is OFFLINE
When join/leave message are sent to the multicast group, a default
time-to-live (see java.net.MulticastSocket) value is used. The
time-to-live value specifies how many "hops" that the packet is forwarded on
the network before it expires.
DiscoveryResponder objects use a time-to-live specified by the property
ttl.
The default time-to-live value is 1. This can be changed when the
DiscoveryResponder is registered in the framework by
specifying the ttl keys in the ObjectName.
It can be be also changed using setTimeToLive
method when the DiscoveryResponder is OFFLINE
For example, to register a DiscoveryResponder that uses
the group 224.224.224.222, port 4404 and sends multicast join and leave messages
through 4 hops, use the following object name:
domain:com.sun.jaw.impl.agent.services.jawdiscovery.DiscoveryResponder.group=224.224.224.222,port=4404,ttl=4
DiscoveryResponder.
DiscoveryResponder in string form.
AdaptorServer is active.
public static final int ONLINE
public static final int OFFLINE
public static final int STOPPING
public DiscoveryResponder()
public DiscoveryResponder(Framework cmf)
multicastGroup and multicastPort.
cmf - The actual JDMK framework object.
public void initCmf(Framework cmf,
ObjectName name,
boolean db,
ModificationList list) throws IllegalAccessException, ServiceNotFoundException, InstanceAlreadyExistException
public void deleteCmf() throws InstanceNotFoundException, IllegalAccessException, ServiceNotFoundException
public void performStart()
public void performStop()
public boolean isActive()
AdaptorServer is active.
public String getClassVersion()
public String getMulticastGroup()
public void setMulticastGroup(String multicastGroup)
public int getMulticastPort()
public void setMulticastPort(int multicastPort)
public int getTimeToLive()
public void setTimeToLive(int ttl)
public Integer getState()
DiscoveryResponder.
ONLINE, OFFLINE or STOPPING.
public String getStateString()
DiscoveryResponder in string form.
All Packages Class Hierarchy This Package Previous Next Index