org.ow2.jonas.discovery.jgroups.comm
Class DiscCommManager

java.lang.Object
  extended by org.ow2.jonas.discovery.jgroups.comm.DiscCommManager
All Implemented Interfaces:
Runnable, DiscComm, DiscRunnable

public class DiscCommManager
extends Object
implements DiscComm

Assumes general communication in Master instances of JGroups discovery.

Author:
eyindanga

Constructor Summary
DiscCommManager(String discoveryType)
          The constructor.
 
Method Summary
 void receiveGreetingMessage()
          Waits until a duplicate server name is notified by the channel listener, or time out exceeds.
 void run()
           
 void sendNotif(org.jgroups.Address dest, DiscMessage msg)
          sends (multicasts) a Discovery Message to the group.
 void start()
          Start it.
 void stop()
          Stop it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscCommManager

public DiscCommManager(String discoveryType)
The constructor.

Parameters:
discoveryType -
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in interface DiscRunnable

stop

public void stop()
Description copied from interface: DiscRunnable
Stop it.

Specified by:
stop in interface DiscRunnable

start

public void start()
           throws StopDiscException
Description copied from interface: DiscRunnable
Start it.

Specified by:
start in interface DiscRunnable
Throws:
StopDiscException - Discovery must stop.

receiveGreetingMessage

public void receiveGreetingMessage()
                            throws DuplicateServerNameException
Waits until a duplicate server name is notified by the channel listener, or time out exceeds.

Throws:
DuplicateServerNameException - Server is duplicated.

sendNotif

public void sendNotif(org.jgroups.Address dest,
                      DiscMessage msg)
sends (multicasts) a Discovery Message to the group.

Parameters:
msg - The message to send.


Copyright © 2010 OW2 Consortium. All Rights Reserved.