|
|||||||||
| Home >> All >> org >> activemq >> [ broker overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.activemq.broker
Class BrokerClientStub

java.lang.Objectorg.activemq.broker.BrokerClientStub
- All Implemented Interfaces:
- BrokerClient, org.activemq.service.Service
- public class BrokerClientStub
- extends java.lang.Object
- implements BrokerClient
- extends java.lang.Object
A mock dispatcher for testing
- Version:
- $Revision: 1.1.1.1 $
| Field Summary | |
private org.activemq.message.ConnectionInfo |
connectionInfo
|
private java.util.List |
messages
|
private java.lang.Object |
semaphore
|
private javax.security.auth.Subject |
subject
|
| Constructor Summary | |
BrokerClientStub()
|
|
BrokerClientStub(java.lang.Object semaphore)
|
|
| Method Summary | |
void |
cleanUp()
Called when the transport has been terminated, so do our best to shut down any resources and deregister from any subscriptions etc |
void |
dispatch(org.activemq.message.ActiveMQMessage message)
Dispatch an ActiveMQMessage to the end client |
java.util.List |
flushMessages()
|
BrokerConnector |
getBrokerConnector()
|
int |
getCapacity()
Get the Capacity for in-progress messages at the peer (probably a JMSConnection) Legimate values between 0-100. |
org.activemq.transport.TransportChannel |
getChannel()
|
java.lang.String |
getClientID()
|
org.activemq.message.ConnectionInfo |
getConnectionInfo()
|
javax.security.auth.Subject |
getSubject()
|
void |
initialize(BrokerConnector brokerConnector,
org.activemq.transport.TransportChannel channel)
Initialize the Brokerclient |
boolean |
isBrokerConnection()
|
boolean |
isClusteredConnection()
|
boolean |
isSlowConsumer()
Get an indication if the peer should be considered as a slow consumer |
void |
setConnectionInfo(org.activemq.message.ConnectionInfo connectionInfo)
|
void |
setSubject(javax.security.auth.Subject subject)
Associcates a subject with BrokerClient. |
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
void |
updateBrokerCapacity(int capacity)
Update the peer Connection about the Broker's capacity for messages |
void |
validateConnection(int timeout)
Tests the connection to assert that it in fact is alive by asserting that a full round-trip to the client is possible. |
void |
waitForMessageToArrive()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
messages
private java.util.List messages
semaphore
private java.lang.Object semaphore
subject
private javax.security.auth.Subject subject
connectionInfo
private org.activemq.message.ConnectionInfo connectionInfo
| Constructor Detail |
BrokerClientStub
public BrokerClientStub()
BrokerClientStub
public BrokerClientStub(java.lang.Object semaphore)
| Method Detail |
getConnectionInfo
public org.activemq.message.ConnectionInfo getConnectionInfo()
- Specified by:
getConnectionInfoin interfaceBrokerClient
setConnectionInfo
public void setConnectionInfo(org.activemq.message.ConnectionInfo connectionInfo)
flushMessages
public java.util.List flushMessages()
dispatch
public void dispatch(org.activemq.message.ActiveMQMessage message)
- Description copied from interface:
BrokerClient - Dispatch an ActiveMQMessage to the end client
- Specified by:
dispatchin interfaceBrokerClient
initialize
public void initialize(BrokerConnector brokerConnector, org.activemq.transport.TransportChannel channel)
- Description copied from interface:
BrokerClient - Initialize the Brokerclient
- Specified by:
initializein interfaceBrokerClient
waitForMessageToArrive
public void waitForMessageToArrive()
start
public void start()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.service.Service - Called to start the service
- Specified by:
startin interfaceorg.activemq.service.Service
stop
public void stop()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.service.Service - Called to shutdown the service
- Specified by:
stopin interfaceorg.activemq.service.Service
isBrokerConnection
public boolean isBrokerConnection()
- Specified by:
isBrokerConnectionin interfaceBrokerClient
getCapacity
public int getCapacity()
- Get the Capacity for in-progress messages at the peer (probably a JMSConnection)
Legimate values between 0-100. 100 representing that the peer cannot process
any more messages at the current time
- Specified by:
getCapacityin interfaceBrokerClient
isSlowConsumer
public boolean isSlowConsumer()
- Get an indication if the peer should be considered as a slow consumer
- Specified by:
isSlowConsumerin interfaceBrokerClient
updateBrokerCapacity
public void updateBrokerCapacity(int capacity)
- Update the peer Connection about the Broker's capacity for messages
- Specified by:
updateBrokerCapacityin interfaceBrokerClient
getClientID
public java.lang.String getClientID()
- Specified by:
getClientIDin interfaceBrokerClient
cleanUp
public void cleanUp()
- Description copied from interface:
BrokerClient - Called when the transport has been terminated, so do our best to
shut down any resources and deregister from any subscriptions etc
- Specified by:
cleanUpin interfaceBrokerClient
getChannel
public org.activemq.transport.TransportChannel getChannel()
- Specified by:
getChannelin interfaceBrokerClient
getBrokerConnector
public BrokerConnector getBrokerConnector()
- Specified by:
getBrokerConnectorin interfaceBrokerClient
isClusteredConnection
public boolean isClusteredConnection()
- Specified by:
isClusteredConnectionin interfaceBrokerClient
validateConnection
public void validateConnection(int timeout)
throws javax.jms.JMSException
- Description copied from interface:
BrokerClient - Tests the connection to assert that it in fact is alive by asserting that
a full round-trip to the client is possible.
- Specified by:
validateConnectionin interfaceBrokerClient
setSubject
public void setSubject(javax.security.auth.Subject subject)
- Description copied from interface:
BrokerClient - Associcates a subject with BrokerClient.
- Specified by:
setSubjectin interfaceBrokerClient
getSubject
public javax.security.auth.Subject getSubject()
- Specified by:
getSubjectin interfaceBrokerClient
|
|||||||||
| Home >> All >> org >> activemq >> [ broker overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.activemq.broker.BrokerClientStub