org.ow2.jonas.discovery.jgroups
Class JgroupsDiscoveryServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.discovery.base.BaseDiscovery
org.ow2.jonas.discovery.jgroups.JgroupsDiscoveryServiceImpl
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter, DiscoveryServiceImplMBean, DiscoveryService, JgroupsDiscoveryServiceImplMBean, Service
public class JgroupsDiscoveryServiceImpl
- extends BaseDiscovery
- implements JgroupsDiscoveryServiceImplMBean
This is a JGroups based JOnAS discovery implementation.
- Author:
- eyindanga
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
JgroupsDiscoveryServiceImpl
public JgroupsDiscoveryServiceImpl()
doStart
public void doStart()
throws ServiceException
- Description copied from class:
AbsServiceImpl
- Abstract start-up method to be implemented by sub-classes.
- Specified by:
doStart in class AbsServiceImpl
- Throws:
ServiceException - service start-up failed
start
public void start(HashMap<String,Object> env,
MBeanServer mbeanSrv,
String discoveryType)
throws Exception
- Starts JGroups discovery with a given environment and a mbean server.
- Parameters:
env - Contains discovery propertiesmbeanSrv - Contains discovery propertiesdiscoveryType - MBean server of discovery host.
- Throws:
Exception - Any
doStop
public void doStop()
throws ServiceException
- Description copied from class:
AbsServiceImpl
- Abstract method for service stopping to be implemented by sub-classes.
- Specified by:
doStop in class AbsServiceImpl
- Throws:
ServiceException - service stopping failed
getDiscoveryProtocolVersion
public String getDiscoveryProtocolVersion()
- Specified by:
getDiscoveryProtocolVersion in interface DiscoveryServiceImplMBean
- Returns:
- the discovery protocol version number
getDiscoveryTtl
public String getDiscoveryTtl()
- Specified by:
getDiscoveryTtl in interface DiscoveryServiceImplMBean
- Returns:
- the time-to-live of the discovery multicast
startDiscoveryMaster
public void startDiscoveryMaster()
throws JMException
- Description copied from interface:
DiscoveryServiceImplMBean
- Make this server a discovery master.
- Specified by:
startDiscoveryMaster in interface DiscoveryServiceImplMBean
- Throws:
JMException - a JMX exception occured when trying to make current server a discovery master
getJonasName
public String getJonasName()
- Specified by:
getJonasName in interface DiscoveryServiceImplMBean
- Returns:
- the jonasName
getMyOn
public ObjectName getMyOn()
- Specified by:
getMyOn in interface DiscoveryServiceImplMBean
- Returns:
- the myOn
getServerId
public String getServerId()
- Specified by:
getServerId in interface DiscoveryServiceImplMBean
- Returns:
- the serverId
getUrls
public String[] getUrls()
- Specified by:
getUrls in interface DiscoveryServiceImplMBean
- Returns:
- the urls
setDomainName
public void setDomainName(String domainName)
- Specified by:
setDomainName in interface DiscoveryServiceImplMBean
- Parameters:
domainName - the domainName to set
setJonasName
public void setJonasName(String jonasName)
- Specified by:
setJonasName in interface DiscoveryServiceImplMBean
- Parameters:
jonasName - the jonasName to set
setMyOn
public void setMyOn(ObjectName myOn)
- Specified by:
setMyOn in interface DiscoveryServiceImplMBean
- Parameters:
myOn - the myOn to set
setServerId
public void setServerId(String serverId)
- Specified by:
setServerId in interface DiscoveryServiceImplMBean
- Parameters:
serverId - the serverId to set
setUrls
public void setUrls(String[] urls)
- Specified by:
setUrls in interface DiscoveryServiceImplMBean
- Parameters:
urls - the urls to set
setGroupName
public void setGroupName(String groupName)
- Parameters:
groupName - the groupName to set. Used by the injector
setJgroupsConf
public void setJgroupsConf(String conf)
- Parameters:
conf - The JGroups configuration file name to set. Used by the injector
getListeningIp
public String getListeningIp()
- Specified by:
getListeningIp in interface DiscoveryServiceImplMBean- Specified by:
getListeningIp in class BaseDiscovery
- Returns:
- the listeningIp
getListeningPort
public int getListeningPort()
- Specified by:
getListeningPort in interface DiscoveryServiceImplMBean- Specified by:
getListeningPort in class BaseDiscovery
- Returns:
- the listeningPort
getUrlsList
public ArrayList getUrlsList()
- Specified by:
getUrlsList in interface DiscoveryServiceImplMBean- Specified by:
getUrlsList in class BaseDiscovery
- Returns:
- the urlsList
setListeningIp
public void setListeningIp(String listeningIp)
- Specified by:
setListeningIp in interface DiscoveryServiceImplMBean- Specified by:
setListeningIp in class BaseDiscovery
- Parameters:
listeningIp - the listeningIp to set
setListeningPort
public void setListeningPort(int listeningPort)
- Specified by:
setListeningPort in interface DiscoveryServiceImplMBean- Specified by:
setListeningPort in class BaseDiscovery
- Parameters:
listeningPort - the listeningPort to set
setUrlsList
public void setUrlsList(ArrayList urlsList)
- Specified by:
setUrlsList in interface DiscoveryServiceImplMBean- Specified by:
setUrlsList in class BaseDiscovery
- Parameters:
urlsList - the urlsList to set
getGreetingListeningPort
public int getGreetingListeningPort()
setTimeToLive
public void setTimeToLive(int ttl)
getMulticastAddress
public String getMulticastAddress()
- Specified by:
getMulticastAddress in interface DiscoveryServiceImplMBean
- Returns:
- the multicast group IP address used by the discovery service
getMulticastPort
public String getMulticastPort()
- Specified by:
getMulticastPort in interface DiscoveryServiceImplMBean
- Returns:
- the multicast group port number used by the discovery service
setReconnectionTimeout
public void setReconnectionTimeout(long reconnectionTimeout)
setHaService
public void setHaService(HaService haService)
Copyright ? 2009 OW2 Consortium. All Rights Reserved.