org.objectweb.jonas.server.discovery
Class DiscoveryManager

java.lang.Object
  extended byorg.objectweb.jonas.server.discovery.DiscoveryManager
All Implemented Interfaces:
DiscoveryManagerMBean, java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationListener

public class DiscoveryManager
extends java.lang.Object
implements DiscoveryManagerMBean, javax.management.MBeanRegistration, javax.management.NotificationListener

DiscoveryManager goal is to listen to a well known and reconfigurable IpAddress and to give appropriate JMXURL to manage remotely Jonas server.

Version:
1.0
Author:
Takoua Abdellatif

Constructor Summary
DiscoveryManager()
           
 
Method Summary
 java.lang.String getListeningIp()
           
 int getListeningPort()
          gets the port on which the DiscoveryManager is listening for a discovery request.
 int getTimeToLive()
          gets the time to live of the multicast socket.
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
           
 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)
          (non-Javadoc)
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryManager

public DiscoveryManager()
Method Detail

start

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

Specified by:
start in interface DiscoveryManagerMBean

getListeningPort

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

Specified by:
getListeningPort in interface DiscoveryManagerMBean
Returns:
notification port.
See Also:
DiscoveryManagerMBean.getListeningPort()

setListeningPort

public void setListeningPort(int listeningPort)
(non-Javadoc)

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

getListeningIp

public java.lang.String getListeningIp()
Specified by:
getListeningIp in interface DiscoveryManagerMBean
Returns:
IP address the DiscoveryManager uses.
See Also:
DiscoveryManagerMBean.getListeningIp()

setListeningIP

public void setListeningIP(java.lang.String listeningIP)
Description copied from interface: DiscoveryManagerMBean
sets the IP address the listening manager uses.

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

setTimeToLive

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

Specified by:
setTimeToLive in interface DiscoveryManagerMBean
Parameters:
ttl -
See Also:
org.objectweb.jonas.server.discovery.DiscoveryManagerMBean#setTimeToLive()

getTimeToLive

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

Specified by:
getTimeToLive in interface DiscoveryManagerMBean
Returns:
ttl value.
See Also:
DiscoveryManagerMBean.getTimeToLive()

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()

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Specified by:
handleNotification in interface javax.management.NotificationListener
See Also:
NotificationListener.handleNotification(javax.management.Notification, java.lang.Object)