public class MultipointDiscoveryAgent extends java.lang.Object implements DiscoveryAgent, ServerService, SelfManaging
Constructor and Description |
---|
MultipointDiscoveryAgent() |
MultipointDiscoveryAgent(boolean debug,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.net.URI> |
getConnectionsQueued() |
long |
getHeartbeats() |
java.lang.String |
getHeartbeatsLatest() |
long |
getHeartbeatsLatestTime() |
java.lang.String |
getHost() |
java.lang.String |
getInitialServers() |
java.lang.String |
getIP() |
long |
getJoined() |
java.lang.String |
getName() |
int |
getPort() |
long |
getReconnectDelay() |
long |
getReconnects() |
java.lang.String |
getReconnectsLatest() |
long |
getReconnectsLatestTime() |
java.util.Set<java.net.URI> |
getRoots() |
long |
getRuns() |
java.lang.String |
getRunsLatest() |
long |
getRunsLatestTime() |
java.util.List<java.net.URI> |
getSessions() |
long |
getSessionsCreated() |
java.lang.String |
getSessionsCreatedLatest() |
long |
getSessionsCreatedLatestTime() |
java.net.URI |
getURI() |
void |
init(java.util.Properties props) |
static void |
main(java.lang.String[] args) |
void |
registerService(java.net.URI serviceUri)
register a service
|
void |
reportFailed(java.net.URI serviceUri)
A process actively using a service may see it go down before the DiscoveryAgent notices the
service's failure.
|
void |
restart() |
void |
service(java.io.InputStream in,
java.io.OutputStream out) |
void |
service(java.net.Socket socket) |
void |
setDiscoveryListener(DiscoveryListener listener)
Sets the discovery listener
|
void |
setHost(java.lang.String host) |
void |
start()
start the discovery agent
|
void |
stop()
stop the channel
|
void |
unregisterService(java.net.URI serviceUri)
register a service
|
public MultipointDiscoveryAgent()
public MultipointDiscoveryAgent(boolean debug, java.lang.String name)
public java.lang.String getIP()
getIP
in interface ServerService
public java.lang.String getName()
getName
in interface ServerService
public int getPort()
getPort
in interface ServerService
public java.lang.String getInitialServers()
public void setDiscoveryListener(DiscoveryListener listener)
DiscoveryAgent
setDiscoveryListener
in interface DiscoveryAgent
public void registerService(java.net.URI serviceUri) throws java.io.IOException
DiscoveryAgent
registerService
in interface DiscoveryAgent
java.io.IOException
public void unregisterService(java.net.URI serviceUri) throws java.io.IOException
DiscoveryAgent
unregisterService
in interface DiscoveryAgent
java.io.IOException
public void reportFailed(java.net.URI serviceUri)
DiscoveryAgent
reportFailed
in interface DiscoveryAgent
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void start() throws ServiceException
start
in interface ServerService
ServiceException
- On errorpublic void restart() throws ServiceException
ServiceException
public void stop() throws ServiceException
stop
in interface ServerService
ServiceException
- On errorpublic void service(java.io.InputStream in, java.io.OutputStream out) throws ServiceException, java.io.IOException
service
in interface ServerService
ServiceException
java.io.IOException
public void service(java.net.Socket socket) throws ServiceException, java.io.IOException
service
in interface ServerService
ServiceException
java.io.IOException
public java.lang.String getHost()
public void setHost(java.lang.String host)
public java.net.URI getURI()
public java.util.Set<java.net.URI> getRoots()
public long getRuns()
public java.lang.String getRunsLatest()
public long getRunsLatestTime()
public long getHeartbeats()
public java.lang.String getHeartbeatsLatest()
public long getHeartbeatsLatestTime()
public long getSessionsCreated()
public java.lang.String getSessionsCreatedLatest()
public long getSessionsCreatedLatestTime()
public long getReconnects()
public java.lang.String getReconnectsLatest()
public long getReconnectsLatestTime()
public long getJoined()
public java.util.List<java.net.URI> getSessions()
public java.util.List<java.net.URI> getConnectionsQueued()
public long getReconnectDelay()