|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.internal.MulticastDiscoveryServiceImpl
public class MulticastDiscoveryServiceImpl
The discovery service creates and starts at least a DiscoveryManager
which is a MBean that multi-casts discovery information
to all
the servers who joined the discovery multicast group
.
The discovery service may also create a Enroller
and a
DiscoveryClient
, and in this case the current server becomes
a discovery server
.
Discovery information
contains information allowing to
remotely manage a server in the group.
Discovery multicast group
is a group of servers which can
be managed remotely by a discovery server.
Discovery server
is the server in the group who detains
the discovery information concerning all the servers in the group.
Field Summary |
---|
Fields inherited from class org.ow2.jonas.discovery.base.BaseDiscovery |
---|
urlsList |
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
MulticastDiscoveryServiceImpl()
|
Method Summary | |
---|---|
protected void |
doStart()
Start the discovery service. |
protected void |
doStop()
Stop the discovery service. |
DiscEvent |
getDiscEvent(String serverName,
String domainName,
String[] connectorURLs,
String state)
Create a 'fake' DiscEvent object containing info to establish a JMX connection with a new server in the domain. |
String |
getDiscoveryAddress()
|
ObjectName |
getDiscoveryClient()
Gets the MBean of disovery client. |
ObjectName |
getDiscoveryManager()
Gets the MBean of disovery manager. |
String |
getDiscoveryPort()
|
String |
getDiscoveryProtocolVersion()
|
String |
getDiscoveryTtl()
|
ObjectName |
getEnroller()
Gets the MBean of the enroller. |
int |
getGreetingPort()
Gets the greeting listening port. |
String |
getJonasName()
|
String |
getListeningIp()
|
int |
getListeningPort()
|
MBeanServer |
getMbeanServer()
|
String |
getMulticastAddress()
|
String |
getMulticastPort()
|
ObjectName |
getMyOn()
|
String |
getServerId()
|
int |
getSourcePort()
Gets the discovery source port. |
String[] |
getUrls()
|
ArrayList |
getUrlsList()
|
void |
setDomainName(String domainName)
|
void |
setGreetingPort(int port)
sets the greeting listening port. |
void |
setJonasName(String jonasName)
|
void |
setListeningIp(String listeningIp)
|
void |
setListeningPort(int listeningPort)
|
void |
setMbeanServer(MBeanServer mbeanServer)
|
void |
setMulticastAddress(String address)
|
void |
setMulticastPort(int port)
|
void |
setMyOn(ObjectName myOn)
|
void |
setServerId(String serverId)
|
void |
setSourcePort(int sourcePort)
sets discovery source port. |
void |
setUrls(String[] urls)
|
void |
setUrlsList(ArrayList urlsList)
|
void |
startDiscoveryMaster()
Management operation allowing to make the current server become a master if its not already. |
Methods inherited from class org.ow2.jonas.discovery.base.BaseDiscovery |
---|
getGreetingTimeout, getIsDiscoveryMaster, getJmxService, getTtl, setGreetingTimeout, setJmxService, setMaster, setTtl |
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, 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.discovery.base.DiscoveryServiceImplMBean |
---|
getDomainName, getGreetingTimeout, getIsDiscoveryMaster, getTtl, setGreetingTimeout, setMaster, setTtl, start, stop |
Methods inherited from interface org.ow2.jonas.service.Service |
---|
getName, init, isStarted, setName, start, stop |
Constructor Detail |
---|
public MulticastDiscoveryServiceImpl()
Method Detail |
---|
public String getDiscoveryAddress()
public String getDiscoveryPort()
public void setMulticastAddress(String address)
address
- the multicast group IP address used by the discovery service.Used on injectionpublic void setMulticastPort(int port)
port
- multi-cast group port number. Used on injectionpublic void startDiscoveryMaster() throws JMException
startDiscoveryMaster
in interface DiscoveryServiceImplMBean
JMException
- a JMX exception occurred when trying to make current server a discovery masterprotected void doStart() throws ServiceException
doStart
in class AbsServiceImpl
ServiceException
- An error occurred when starting the serviceprotected void doStop() throws ServiceException
doStop
in class AbsServiceImpl
ServiceException
- service stopping failedpublic DiscEvent getDiscEvent(String serverName, String domainName, String[] connectorURLs, String state)
serverName
- the OBJECT_NAME of the server MBean corresponding to the server to connectdomainName
- the JOnAS server's domain nameconnectorURLs
- the urls of the connector server of the server to connectstate
- the state of the server (RUNNING in case the DiscEvent is used to add a server; could be STOPPING
if the DiscEvent is used to remove a server)
public String getDiscoveryProtocolVersion()
getDiscoveryProtocolVersion
in interface DiscoveryServiceImplMBean
public String getDiscoveryTtl()
getDiscoveryTtl
in interface DiscoveryServiceImplMBean
DiscoveryServiceImplMBean.getDiscoveryTtl()
public ObjectName getDiscoveryClient()
MulticastDiscoveryServiceImplMBean
getDiscoveryClient
in interface MulticastDiscoveryServiceImplMBean
public ObjectName getDiscoveryManager() throws MalformedObjectNameException
MulticastDiscoveryServiceImplMBean
getDiscoveryManager
in interface MulticastDiscoveryServiceImplMBean
MalformedObjectNameException
public ObjectName getEnroller() throws MalformedObjectNameException
MulticastDiscoveryServiceImplMBean
getEnroller
in interface MulticastDiscoveryServiceImplMBean
MalformedObjectNameException
public String getListeningIp()
getListeningIp
in interface DiscoveryServiceImplMBean
getListeningIp
in class BaseDiscovery
public int getListeningPort()
getListeningPort
in interface DiscoveryServiceImplMBean
getListeningPort
in class BaseDiscovery
public int getSourcePort()
MulticastDiscoveryServiceImplMBean
getSourcePort
in interface MulticastDiscoveryServiceImplMBean
public void setListeningIp(String listeningIp)
setListeningIp
in interface DiscoveryServiceImplMBean
setListeningIp
in class BaseDiscovery
listeningIp
- the listeningIp to setpublic void setListeningPort(int listeningPort)
setListeningPort
in interface DiscoveryServiceImplMBean
setListeningPort
in class BaseDiscovery
listeningPort
- the listeningPort to setpublic void setSourcePort(int sourcePort)
MulticastDiscoveryServiceImplMBean
setSourcePort
in interface MulticastDiscoveryServiceImplMBean
sourcePort
- the sourcePort to setpublic void setUrlsList(ArrayList urlsList)
setUrlsList
in interface DiscoveryServiceImplMBean
setUrlsList
in class BaseDiscovery
urlsList
- the urlsList to setpublic int getGreetingPort()
MulticastDiscoveryServiceImplMBean
getGreetingPort
in interface MulticastDiscoveryServiceImplMBean
public void setGreetingPort(int port)
MulticastDiscoveryServiceImplMBean
setGreetingPort
in interface MulticastDiscoveryServiceImplMBean
port
- greeting port.public ArrayList getUrlsList()
getUrlsList
in interface DiscoveryServiceImplMBean
getUrlsList
in class BaseDiscovery
public String getJonasName()
getJonasName
in interface DiscoveryServiceImplMBean
public MBeanServer getMbeanServer()
public ObjectName getMyOn()
getMyOn
in interface DiscoveryServiceImplMBean
public String getServerId()
getServerId
in interface DiscoveryServiceImplMBean
public String[] getUrls()
getUrls
in interface DiscoveryServiceImplMBean
public void setDomainName(String domainName)
setDomainName
in interface DiscoveryServiceImplMBean
domainName
- the domainName to setpublic void setJonasName(String jonasName)
setJonasName
in interface DiscoveryServiceImplMBean
jonasName
- the jonasName to setpublic void setMbeanServer(MBeanServer mbeanServer)
public void setMyOn(ObjectName myOn)
setMyOn
in interface DiscoveryServiceImplMBean
myOn
- the myOn to setpublic void setServerId(String serverId)
setServerId
in interface DiscoveryServiceImplMBean
serverId
- the serverId to setpublic void setUrls(String[] urls)
setUrls
in interface DiscoveryServiceImplMBean
urls
- the urls to setpublic String getMulticastAddress()
getMulticastAddress
in interface DiscoveryServiceImplMBean
public String getMulticastPort()
getMulticastPort
in interface DiscoveryServiceImplMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |