|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.transport.DiscoveryAgentSupport
org.activemq.transport.multicast.MulticastDiscoveryAgent
An agent used to discover other instances of a service
| Field Summary | |
static java.lang.String |
DEFAULT_DISCOVERY_URI
default URI used for discovery |
| Fields inherited from class org.activemq.transport.DiscoveryAgentSupport |
listeners |
| Constructor Summary | |
MulticastDiscoveryAgent(java.lang.String channelName)
Construct a discovery agent that uses multicast |
|
MulticastDiscoveryAgent(java.net.URI uri)
|
|
| Method Summary | |
void |
consume(Packet packet)
Consume multicast packets |
java.lang.String |
getChannelName()
|
long |
getKeepAliveTimeout()
|
java.lang.String |
getLocalId()
|
int |
getServicesCount()
|
int |
getTimeoutCount()
|
int |
getTimeToLive()
|
java.net.URI |
getUri()
|
void |
registerService(java.lang.String name,
java.util.Map details)
Register a service for other discover nodes |
void |
run()
send a keep alive message |
void |
setChannelName(java.lang.String channelName)
|
void |
setKeepAliveTimeout(long keepAliveTimeout)
|
void |
setLocalId(java.lang.String localId)
|
void |
setTimeoutCount(int timeoutCount)
|
void |
setTimeToLive(int timeToLive)
|
void |
setUri(java.net.URI uri)
|
void |
start()
start this discovery agent |
void |
stop()
stop this discovery agent |
java.lang.String |
toString()
|
| Methods inherited from class org.activemq.transport.DiscoveryAgentSupport |
addDiscoveryListener, fireAddService, fireRemoveService, removeDiscoveryListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_DISCOVERY_URI
| Constructor Detail |
public MulticastDiscoveryAgent(java.lang.String channelName)
throws javax.jms.JMSException
channelName -
javax.jms.JMSExceptionpublic MulticastDiscoveryAgent(java.net.URI uri)
| Method Detail |
public long getKeepAliveTimeout()
public void setKeepAliveTimeout(long keepAliveTimeout)
keepAliveTimeout - The keepAliveTimeout to set.public int getTimeoutCount()
public void setTimeoutCount(int timeoutCount)
timeoutCount - The timeoutCount to set.public java.lang.String getLocalId()
public void setLocalId(java.lang.String localId)
localId - The localId to set.public java.net.URI getUri()
public void setUri(java.net.URI uri)
uri - The uri to set.public int getTimeToLive()
public void setTimeToLive(int timeToLive)
throws java.io.IOException
timeToLive - The timeToLive for multicast packets used in discovery.
java.io.IOExceptionpublic java.lang.String getChannelName()
public void setChannelName(java.lang.String channelName)
channelName - The channelName to set.public java.lang.String toString()
public int getServicesCount()
public void registerService(java.lang.String name,
java.util.Map details)
throws javax.jms.JMSException
registerService in interface DiscoveryAgentname - details -
javax.jms.JMSException
public void start()
throws javax.jms.JMSException
start in interface Servicejavax.jms.JMSException
public void stop()
throws javax.jms.JMSException
stop in interface Servicejavax.jms.JMSExceptionpublic void run()
run in interface java.lang.Runnablepublic void consume(Packet packet)
consume in interface PacketListenerpacket -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||