org.ow2.jonas.discovery.base
Class BaseDiscovery

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by org.ow2.jonas.discovery.base.BaseDiscovery
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, DiscoveryServiceImplMBean, org.ow2.jonas.discovery.DiscoveryService, org.ow2.jonas.service.Service

public abstract class BaseDiscovery
extends org.ow2.jonas.lib.service.AbsServiceImpl
implements org.ow2.jonas.discovery.DiscoveryService, DiscoveryServiceImplMBean

This class is inherited by all discovery Implementations It provides common discovery operations.

Author:
eyindanga

Field Summary
protected static int DISCOVERY_TTL_DEFAULT
          This attribute is injected TimeToLive value.
protected  int greetingAckTimeOut
          This attribute is injected The time period in miliseconds to listen for greeting responses.
protected  boolean isDiscoveryMaster
          This attribute is injected set to true if enroller and discoveryClient started.
protected  org.ow2.jonas.jmx.JmxService jmxService
          This attribute is injected
protected  int ttl
          This attribute is injected TimeToLive default value
protected  ArrayList urlsList
          Array list of urls retrived from jmxService.
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
BaseDiscovery()
           
 
Method Summary
abstract  int getGreetingTimeout()
           
abstract  org.ow2.jonas.jmx.JmxService getJmxService()
           
abstract  String getListeningIp()
           
abstract  int getListeningPort()
           
abstract  int getTtl()
           
abstract  ArrayList getUrlsList()
           
abstract  boolean isDiscoveryMaster()
           
abstract  void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
          Sets the jmxService.
abstract  void setListeningIp(String listeningIp)
           
abstract  void setListeningPort(int listeningPort)
           
abstract  void setMaster(boolean isDiscoveryMaster)
           
abstract  void setTtl(int ttl)
           
abstract  void setUrlsList(ArrayList urlsList)
           
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
checkRequirements, convertToList, doInit, doStart, doStop, getDomainName, getJonasServerName, getName, getServerProperties, init, isOSGi, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.service.Service
checkRequirements, getName, init, isStarted, setName, start, stop
 
Methods inherited from interface org.ow2.jonas.discovery.base.DiscoveryServiceImplMBean
getDiscoveryProtocolVersion, getDiscoveryTtl, getDomainName, getIsDiscoveryMaster, getJonasName, getMbeanServer, getMulticastAddress, getMulticastPort, getMyOn, getServerId, getUrls, setDomainName, setGreetingTimeout, setJonasName, setMbeanServer, setMyOn, setServerId, setUrls, start, startDiscoveryMaster, stop
 

Field Detail

greetingAckTimeOut

protected int greetingAckTimeOut
This attribute is injected The time period in miliseconds to listen for greeting responses.


DISCOVERY_TTL_DEFAULT

protected static final int DISCOVERY_TTL_DEFAULT
This attribute is injected TimeToLive value.

See Also:
Constant Field Values

ttl

protected int ttl
This attribute is injected TimeToLive default value


isDiscoveryMaster

protected boolean isDiscoveryMaster
This attribute is injected set to true if enroller and discoveryClient started.


jmxService

protected org.ow2.jonas.jmx.JmxService jmxService
This attribute is injected


urlsList

protected ArrayList urlsList
Array list of urls retrived from jmxService.

Constructor Detail

BaseDiscovery

public BaseDiscovery()
Method Detail

getGreetingTimeout

public abstract int getGreetingTimeout()
Specified by:
getGreetingTimeout in interface DiscoveryServiceImplMBean
Returns:
the greetingAckTimeOut

isDiscoveryMaster

public abstract boolean isDiscoveryMaster()
Specified by:
isDiscoveryMaster in interface DiscoveryServiceImplMBean
Returns:
the isDiscoveryMaster

getListeningIp

public abstract String getListeningIp()
Specified by:
getListeningIp in interface DiscoveryServiceImplMBean
Returns:
the listeningIp

setListeningIp

public abstract void setListeningIp(String listeningIp)
Specified by:
setListeningIp in interface DiscoveryServiceImplMBean
Parameters:
listeningIp - the listeningIp to set

getListeningPort

public abstract int getListeningPort()
Specified by:
getListeningPort in interface DiscoveryServiceImplMBean
Returns:
the listeningPort

setListeningPort

public abstract void setListeningPort(int listeningPort)
Specified by:
setListeningPort in interface DiscoveryServiceImplMBean
Parameters:
listeningPort - the listeningPort to set

getTtl

public abstract int getTtl()
Specified by:
getTtl in interface DiscoveryServiceImplMBean
Returns:
the ttl

setTtl

public abstract void setTtl(int ttl)
Specified by:
setTtl in interface DiscoveryServiceImplMBean
Parameters:
ttl - the ttl to set

getJmxService

public abstract org.ow2.jonas.jmx.JmxService getJmxService()
Returns:
the jmxService

setJmxService

public abstract void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
Sets the jmxService.

Parameters:
jmxService - the jmxService to set. Used by the injector

getUrlsList

public abstract ArrayList getUrlsList()
Specified by:
getUrlsList in interface DiscoveryServiceImplMBean
Returns:
the urlsList

setUrlsList

public abstract void setUrlsList(ArrayList urlsList)
Specified by:
setUrlsList in interface DiscoveryServiceImplMBean
Parameters:
urlsList - the urlsList to set

setMaster

public abstract void setMaster(boolean isDiscoveryMaster)
Specified by:
setMaster in interface DiscoveryServiceImplMBean
Parameters:
isDiscoveryMaster - the isDiscoveryMaster to set


Copyright © 2008 OW2 Consortium. All Rights Reserved.