public class MulticastDiscoveryAgent extends Object implements DiscoveryAgent, Runnable
DiscoveryAgent
using a multicast address and heartbeat packets
encoded using any wireformat, but openwire by default.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DISCOVERY_URI_STRING |
static String |
DEFAULT_HOST_IP |
static String |
DEFAULT_HOST_STR |
static int |
DEFAULT_PORT |
Constructor and Description |
---|
MulticastDiscoveryAgent() |
Modifier and Type | Method and Description |
---|---|
long |
getBackOffMultiplier() |
URI |
getDiscoveryURI() |
long |
getInitialReconnectDelay() |
long |
getKeepAliveInterval() |
int |
getMaxReconnectAttempts() |
long |
getMaxReconnectDelay() |
int |
getTimeToLive() |
String |
getType() |
boolean |
isLoopBackMode() |
boolean |
isUseExponentialBackOff() |
void |
registerService(String name)
register a service
|
void |
run() |
void |
serviceFailed(DiscoveryEvent event)
A process actively using a service may see it go down before the DiscoveryAgent notices the
service's failure.
|
void |
setBackOffMultiplier(long backOffMultiplier) |
void |
setDiscoveryListener(DiscoveryListener listener)
Set the discovery listener
|
void |
setDiscoveryURI(URI discoveryURI)
Set the discoveryURI
|
void |
setGroup(String group) |
void |
setInitialReconnectDelay(long initialReconnectDelay) |
void |
setInterface(String mcInterface) |
void |
setJoinNetworkInterface(String mcJoinNetwrokInterface) |
void |
setKeepAliveInterval(long keepAliveInterval) |
void |
setLoopBackMode(boolean loopBackMode) |
void |
setMaxReconnectAttempts(int maxReconnectAttempts) |
void |
setMaxReconnectDelay(long maxReconnectDelay) |
void |
setNetworkInterface(String mcNetworkInterface) |
void |
setTimeToLive(int timeToLive) |
void |
setUseExponentialBackOff(boolean useExponentialBackOff) |
void |
start()
start the discovery agent
|
void |
stop()
stop the channel
|
String |
toString() |
public static final String DEFAULT_DISCOVERY_URI_STRING
public static final String DEFAULT_HOST_STR
public static final String DEFAULT_HOST_IP
public static final int DEFAULT_PORT
public MulticastDiscoveryAgent()
public void setDiscoveryListener(DiscoveryListener listener)
setDiscoveryListener
in interface DiscoveryAgent
listener
- public void registerService(String name) throws IOException
registerService
in interface DiscoveryAgent
IOException
public boolean isLoopBackMode()
public void setLoopBackMode(boolean loopBackMode)
loopBackMode
- The loopBackMode to set.public int getTimeToLive()
public void setTimeToLive(int timeToLive)
timeToLive
- The timeToLive to set.public URI getDiscoveryURI()
public void setDiscoveryURI(URI discoveryURI)
discoveryURI
- public long getKeepAliveInterval()
public void setKeepAliveInterval(long keepAliveInterval)
public void setInterface(String mcInterface)
public void setNetworkInterface(String mcNetworkInterface)
public void setJoinNetworkInterface(String mcJoinNetwrokInterface)
public void serviceFailed(DiscoveryEvent event) throws IOException
DiscoveryAgent
serviceFailed
in interface DiscoveryAgent
IOException
public long getBackOffMultiplier()
public void setBackOffMultiplier(long backOffMultiplier)
public long getInitialReconnectDelay()
public void setInitialReconnectDelay(long initialReconnectDelay)
public int getMaxReconnectAttempts()
public void setMaxReconnectAttempts(int maxReconnectAttempts)
public long getMaxReconnectDelay()
public void setMaxReconnectDelay(long maxReconnectDelay)
public boolean isUseExponentialBackOff()
public void setUseExponentialBackOff(boolean useExponentialBackOff)
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.