|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.advisories.ConnectionAdvisor
public class ConnectionAdvisor
A helper class for listening for MessageConnection advisories *
| Constructor Summary | |
|---|---|
ConnectionAdvisor(Connection connection)
Construct a ConnectionAdvisor |
|
| Method Summary | |
|---|---|
void |
addListener(ConnectionAdvisoryEventListener l)
Add a listener |
Set |
getConnections()
Retrive all current Connections |
boolean |
isActive(String clientId)
returns true if the connection is active |
int |
numberOfActiveConnections()
return the current number of active connections |
void |
onMessage(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(Connection connection)
throws JMSException
connection -
JMSException| Method Detail |
|---|
public void start()
throws JMSException
JMSException
public void stop()
throws JMSException
JMSExceptionpublic void addListener(ConnectionAdvisoryEventListener l)
l - public void removeListener(ConnectionAdvisoryEventListener l)
l - public boolean isActive(String clientId)
clientId - for the connection
public Set getConnections()
public int waitForActiveConnections(int number,
long timeout)
number - timeout -
public int numberOfActiveConnections()
public void onMessage(Message msg)
onMessage in interface MessageListenermsg -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||