org.objectweb.jonas.discovery
Class Enroller

java.lang.Object
  extended by org.objectweb.jonas.discovery.Enroller
All Implemented Interfaces:
javax.management.MBeanRegistration, EnrollerMBean

public class Enroller
extends java.lang.Object
implements javax.management.MBeanRegistration, EnrollerMBean

In charge of waiting for starting or stopping notifications and notifies the appropriate listeners.

Version:
1.0
Author:
Takoua Abdellatif

Constructor Summary
Enroller(int listeningPort, java.lang.String listeningIp)
           
 
Method Summary
 java.lang.String getListeningIp()
           
 int getListeningPort()
          gets the port on which the Enroller is listening for a discovery request.
 int getTimeToLive()
          gets the time to live of the multicast socket.
 void postDeregister()
           
 void postRegister(java.lang.Boolean arg0)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer mbeanServer, javax.management.ObjectName on)
           
 void setListeningIp(java.lang.String listeningIp)
          sets the IP address the listening manager uses.
 void setListeningPort(int listeningPort)
          sets the port on which the Enroller is listening.
 void setTimeToLive(int ttl)
          sets the time to live value to ttl.
 void start()
          starts the listening task on the listeningPort and listening Ip defined with the parameters.
 void stop()
          stops the listening task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enroller

public Enroller(int listeningPort,
                java.lang.String listeningIp)
Method Detail

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer mbeanServer,
                                               javax.management.ObjectName on)
                                        throws java.lang.Exception
Specified by:
preRegister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception
See Also:
MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

postRegister

public void postRegister(java.lang.Boolean arg0)
Specified by:
postRegister in interface javax.management.MBeanRegistration
See Also:
MBeanRegistration.postRegister(java.lang.Boolean)

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception
See Also:
MBeanRegistration.preDeregister()

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface javax.management.MBeanRegistration
See Also:
MBeanRegistration.postDeregister()

getListeningPort

public int getListeningPort()
Description copied from interface: EnrollerMBean
gets the port on which the Enroller is listening for a discovery request.

Specified by:
getListeningPort in interface EnrollerMBean
Returns:
notification port.
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#getListeningPort()

setListeningPort

public void setListeningPort(int listeningPort)
Description copied from interface: EnrollerMBean
sets the port on which the Enroller is listening.

Specified by:
setListeningPort in interface EnrollerMBean
Parameters:
listeningPort - port on which the Enroller is listening.
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#setListeningPort(int)

getListeningIp

public java.lang.String getListeningIp()
Specified by:
getListeningIp in interface EnrollerMBean
Returns:
IP address the Enroller uses.
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#getListeningIp()

setListeningIp

public void setListeningIp(java.lang.String listeningIp)
Description copied from interface: EnrollerMBean
sets the IP address the listening manager uses.

Specified by:
setListeningIp in interface EnrollerMBean
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#setListeningIP(java.lang.String)

setTimeToLive

public void setTimeToLive(int ttl)
Description copied from interface: EnrollerMBean
sets the time to live value to ttl. Defines the number of hops the multicast socket does.

Specified by:
setTimeToLive in interface EnrollerMBean
Parameters:
ttl - time to live
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#setTimeToLive(int)

getTimeToLive

public int getTimeToLive()
Description copied from interface: EnrollerMBean
gets the time to live of the multicast socket.

Specified by:
getTimeToLive in interface EnrollerMBean
Returns:
ttl value.
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#getTimeToLive()

start

public void start()
Description copied from interface: EnrollerMBean
starts the listening task on the listeningPort and listening Ip defined with the parameters.

Specified by:
start in interface EnrollerMBean
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#start()

stop

public void stop()
Description copied from interface: EnrollerMBean
stops the listening task

Specified by:
stop in interface EnrollerMBean
See Also:
org.objectweb.jonas.server.discovery.EnrollerMBean#start()