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 ServerService
public java.lang.String getName()
getName
in interface ServerService
public int getPort()
getPort
in interface ServerService
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
public void stop() throws ServiceException
stop
in interface ServerService
ServiceException
public 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 boolean isLoopbackMode()
public void setLoopbackMode(boolean loopbackMode)
public int getTimeToLive()
public void setTimeToLive(int timeToLive)