|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.advisories.ConnectionAdvisor
A helper class for listening for MessageConnection advisories *
| Constructor Summary | |
ConnectionAdvisor(javax.jms.Connection connection)
Construct a ConnectionAdvisor |
|
| Method Summary | |
void |
addListener(ConnectionAdvisoryEventListener l)
Add a listener |
java.util.Set |
getConnections()
Retrive all current Connections |
boolean |
isActive(java.lang.String clientId)
returns true if the connection is active |
int |
numberOfActiveConnections()
return the current number of active connections |
void |
onMessage(javax.jms.Message msg)
OnMessage() implementation |
void |
removeListener(ConnectionAdvisoryEventListener l)
Remove a listener |
void |
start()
start listening for advisories |
void |
stop()
stop listening for advisories |
int |
waitForActiveConnections(int number,
long timeout)
Waits until the number of active connections is equivalent to the number supplied, or the timeout is exceeded |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionAdvisor(javax.jms.Connection connection)
throws javax.jms.JMSException
connection -
javax.jms.JMSException| Method Detail |
public void start()
throws javax.jms.JMSException
javax.jms.JMSException
public void stop()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void addListener(ConnectionAdvisoryEventListener l)
l - public void removeListener(ConnectionAdvisoryEventListener l)
l - public boolean isActive(java.lang.String clientId)
clientId - for the connection
public java.util.Set getConnections()
public int waitForActiveConnections(int number,
long timeout)
number - timeout -
public int numberOfActiveConnections()
public void onMessage(javax.jms.Message msg)
onMessage in interface javax.jms.MessageListenermsg -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||