public class MulticastDiscoveryAgent extends java.lang.Object implements DiscoveryAgent, ServerService, SelfManaging
| Constructor and Description |
|---|
MulticastDiscoveryAgent() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHost() |
java.lang.String |
getIP() |
java.lang.String |
getName() |
int |
getPort() |
int |
getTimeToLive() |
void |
init(java.util.Properties props) |
boolean |
isLoopbackMode() |
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 |
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 |
setLoopbackMode(boolean loopbackMode) |
void |
setTimeToLive(int timeToLive) |
void |
start()
start the discovery agent
|
void |
stop()
stop the channel
|
void |
unregisterService(java.net.URI serviceUri)
register a service
|
public java.lang.String getIP()
getIP in interface ServerServicepublic java.lang.String getName()
getName in interface ServerServicepublic int getPort()
getPort in interface ServerServicepublic void setDiscoveryListener(DiscoveryListener listener)
DiscoveryAgentsetDiscoveryListener in interface DiscoveryAgentpublic void registerService(java.net.URI serviceUri)
throws java.io.IOException
DiscoveryAgentregisterService in interface DiscoveryAgentjava.io.IOExceptionpublic void unregisterService(java.net.URI serviceUri)
throws java.io.IOException
DiscoveryAgentunregisterService in interface DiscoveryAgentjava.io.IOExceptionpublic void reportFailed(java.net.URI serviceUri)
DiscoveryAgentreportFailed in interface DiscoveryAgentpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic void start()
throws ServiceException
start in interface ServerServiceServiceExceptionpublic void stop()
throws ServiceException
stop in interface ServerServiceServiceExceptionpublic void service(java.io.InputStream in,
java.io.OutputStream out)
throws ServiceException,
java.io.IOException
service in interface ServerServiceServiceExceptionjava.io.IOExceptionpublic void service(java.net.Socket socket)
throws ServiceException,
java.io.IOException
service in interface ServerServiceServiceExceptionjava.io.IOExceptionpublic java.lang.String getHost()
public void setHost(java.lang.String host)
public boolean isLoopbackMode()
public void setLoopbackMode(boolean loopbackMode)
public int getTimeToLive()
public void setTimeToLive(int timeToLive)