| |
|
| java.lang.Object org.objectweb.jonas.discovery.DiscoveryComm org.objectweb.jonas.discovery.DiscoveryGreetingResponder
All known Subclasses: org.objectweb.jonas.discovery.DiscoveryGreetingListener,
DiscoveryGreetingResponder | public class DiscoveryGreetingResponder extends DiscoveryComm (Code) | | This class sends a multicast message stating the servername and
the port at which it will listen for messages. It listens at the
unicast port for a pre-determined time (greetingTimeOut) and if
it receives a message indicating that a server with the same ID
already exists in the domain then it terminates the discovery service.
author: Vivek Lakshmanan version: 1.0 |
Field Summary | |
protected int | greetingPort Port to listen to for greeting responses. | protected int | greetingTimeOut Time out period to listen to greetingPort for replies. | protected DatagramSocket | recvUnicastSocket Used to recieve responses to the initial greeting message sent out on the multicast port. |
Method Summary | |
protected DiscGreeting | createDiscGreeting(boolean startup) Create a discovery greeting message
Parameters: startup - -true: means that is a greeting message at the point of startup of the discovery service. | public void | handleGreeting() Creates a new thread to send the greeting message and listens for
rejection messages in response. | public void | run() | public void | stop() Throw the run time exception to state that a server with the same
name already exists. |
greetingPort | protected int greetingPort(Code) | | Port to listen to for greeting responses.
|
greetingTimeOut | protected int greetingTimeOut(Code) | | Time out period to listen to greetingPort for replies.
|
recvUnicastSocket | protected DatagramSocket recvUnicastSocket(Code) | | Used to recieve responses to the initial greeting message sent out on the multicast port.
|
DiscoveryGreetingResponder | public DiscoveryGreetingResponder(DiscoveryManager dm)(Code) | | Constructs a DiscoveryGreetingResponder associated to the DiscoveryManager
Parameters: dm - DiscoveryManager to which this instance is associated |
createDiscGreeting | protected DiscGreeting createDiscGreeting(boolean startup)(Code) | | Create a discovery greeting message
Parameters: startup - -true: means that is a greeting message at the point of startup of the discovery service. false: means this is a reply toa previous greeting message. a Discovery Greeting message. |
stop | public void stop()(Code) | | Throw the run time exception to state that a server with the same
name already exists.
|
|
|
|