|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.MutableBrokerFilter
org.apache.activemq.broker.BrokerPluginSupport
org.apache.activemq.broker.util.UDPTraceBrokerPlugin
public class UDPTraceBrokerPlugin
A Broker interceptor which allows you to trace all operations to a UDP socket.
Field Summary | |
---|---|
protected java.net.SocketAddress |
address
|
protected boolean |
broadcast
|
protected BrokerId |
brokerId
|
protected java.net.URI |
destination
|
protected int |
maxTraceDatagramSize
|
protected java.net.DatagramSocket |
socket
|
protected WireFormat |
wireFormat
|
protected WireFormatFactory |
wireFormatFactory
|
Constructor Summary | |
---|---|
UDPTraceBrokerPlugin()
|
Method Summary | |
---|---|
void |
acknowledge(ConnectionContext context,
MessageAck ack)
Used to acknowledge the receipt of a message by a client. |
void |
addConnection(ConnectionContext context,
ConnectionInfo info)
A client is establishing a connection with the broker. |
Subscription |
addConsumer(ConnectionContext context,
ConsumerInfo info)
Adds a consumer. |
void |
addDestinationInfo(ConnectionContext context,
DestinationInfo info)
Add and process a DestinationInfo object |
void |
addProducer(ConnectionContext context,
ProducerInfo info)
Adds a producer. |
void |
addSession(ConnectionContext context,
SessionInfo info)
Adds a session. |
void |
beginTransaction(ConnectionContext context,
TransactionId xid)
Starts a transaction. |
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction. |
protected java.net.DatagramSocket |
createSocket()
|
protected java.net.SocketAddress |
createSocketAddress(java.net.URI location)
|
protected WireFormat |
createWireFormat()
|
protected OpenWireFormatFactory |
createWireFormatFactory()
|
void |
forgetTransaction(ConnectionContext context,
TransactionId xid)
Forgets a transaction. |
java.net.SocketAddress |
getAddress()
|
java.net.URI |
getDestination()
|
int |
getMaxTraceDatagramSize()
|
WireFormat |
getWireFormat()
|
WireFormatFactory |
getWireFormatFactory()
|
boolean |
isBroadcast()
|
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue |
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction. |
void |
processDispatch(MessageDispatch messageDispatch)
Notify the Broker that a dispatch has happened |
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
A client is disconnecting from the broker. |
void |
removeConsumer(ConnectionContext context,
ConsumerInfo info)
Removes a consumer. |
void |
removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
Used to destroy a destination. |
void |
removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
Remove and process a DestinationInfo object |
void |
removeProducer(ConnectionContext context,
ProducerInfo info)
Removes a producer. |
void |
removeSession(ConnectionContext context,
SessionInfo info)
Removes a session. |
void |
removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
Deletes a durable subscription. |
void |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction. |
void |
send(ConnectionContext context,
Message messageSend)
Send a message to the broker to using the specified destination. |
void |
setAddress(java.net.SocketAddress address)
|
void |
setBroadcast(boolean broadcast)
|
void |
setDestination(java.net.URI destination)
|
void |
setMaxTraceDatagramSize(int maxTraceDatagramSize)
|
void |
setWireFormat(WireFormat wireFormat)
|
void |
setWireFormatFactory(WireFormatFactory wireFormatFactory)
|
void |
start()
|
void |
stop()
|
Methods inherited from class org.apache.activemq.broker.BrokerPluginSupport |
---|
installPlugin |
Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter |
---|
addBroker, addDestination, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getNext, getPeerBrokerInfos, getPendingDurableSubscriberPolicy, getPreparedTransactions, getTempDataStore, isFaultTolerantConfiguration, isSlaveBroker, isStopped, removeBroker, setAdminConnectionContext, setNext, setPendingDurableSubscriberPolicy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WireFormat wireFormat
protected WireFormatFactory wireFormatFactory
protected int maxTraceDatagramSize
protected java.net.URI destination
protected java.net.DatagramSocket socket
protected BrokerId brokerId
protected java.net.SocketAddress address
protected boolean broadcast
Constructor Detail |
---|
public UDPTraceBrokerPlugin()
Method Detail |
---|
public void start() throws java.lang.Exception
start
in interface Service
start
in class MutableBrokerFilter
java.lang.Exception
protected java.net.DatagramSocket createSocket() throws java.io.IOException
java.io.IOException
public void stop() throws java.lang.Exception
stop
in interface Service
stop
in class MutableBrokerFilter
java.lang.Exception
public void send(ConnectionContext context, Message messageSend) throws java.lang.Exception
Region
send
in interface Region
send
in class MutableBrokerFilter
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void acknowledge(ConnectionContext context, MessageAck ack) throws java.lang.Exception
Region
acknowledge
in interface Region
acknowledge
in class MutableBrokerFilter
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void addConnection(ConnectionContext context, ConnectionInfo info) throws java.lang.Exception
Broker
addConnection
in interface Broker
addConnection
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
addConsumer
in interface Region
addConsumer
in class MutableBrokerFilter
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws java.lang.Exception
Broker
addDestinationInfo
in interface Broker
addDestinationInfo
in class MutableBrokerFilter
java.lang.Exception
public void addProducer(ConnectionContext context, ProducerInfo info) throws java.lang.Exception
Broker
addProducer
in interface Broker
addProducer
in class MutableBrokerFilter
context
- the enviorment the operation is being executed under.
java.lang.Exception
- TODOpublic void addSession(ConnectionContext context, SessionInfo info) throws java.lang.Exception
Broker
addSession
in interface Broker
addSession
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void beginTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
beginTransaction
in interface Broker
beginTransaction
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws java.lang.Exception
Broker
commitTransaction
in interface Broker
commitTransaction
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void forgetTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
forgetTransaction
in interface Broker
forgetTransaction
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic Response messagePull(ConnectionContext context, MessagePull pull) throws java.lang.Exception
Region
messagePull
in interface Region
messagePull
in class MutableBrokerFilter
java.lang.Exception
public int prepareTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
prepareTransaction
in interface Broker
prepareTransaction
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void processDispatch(MessageDispatch messageDispatch)
Broker
processDispatch
in interface Broker
processDispatch
in class MutableBrokerFilter
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws java.lang.Exception
Region
processDispatchNotification
in interface Region
processDispatchNotification
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void removeConnection(ConnectionContext context, ConnectionInfo info, java.lang.Throwable error) throws java.lang.Exception
Broker
removeConnection
in interface Broker
removeConnection
in class MutableBrokerFilter
context
- the environment the operation is being executed under.error
- null if the client requested the disconnect or the error that caused the client to disconnect.
java.lang.Exception
- TODOpublic void removeConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
removeConsumer
in interface Region
removeConsumer
in class MutableBrokerFilter
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws java.lang.Exception
Region
removeDestination
in interface Region
removeDestination
in class MutableBrokerFilter
context
- the environment the operation is being executed under.destination
- what is being removed from the broker.timeout
- the max amount of time to wait for the destination to quiesce
java.lang.Exception
- TODOpublic void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws java.lang.Exception
Broker
removeDestinationInfo
in interface Broker
removeDestinationInfo
in class MutableBrokerFilter
java.lang.Exception
public void removeProducer(ConnectionContext context, ProducerInfo info) throws java.lang.Exception
Broker
removeProducer
in interface Broker
removeProducer
in class MutableBrokerFilter
context
- the enviorment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeSession(ConnectionContext context, SessionInfo info) throws java.lang.Exception
Broker
removeSession
in interface Broker
removeSession
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws java.lang.Exception
Region
removeSubscription
in interface Region
removeSubscription
in class MutableBrokerFilter
context
- the environment the operation is being executed under.info
- TODO
java.lang.Exception
- TODOpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
rollbackTransaction
in interface Broker
rollbackTransaction
in class MutableBrokerFilter
java.lang.Exception
- TODOpublic WireFormat getWireFormat()
protected WireFormat createWireFormat()
public void setWireFormat(WireFormat wireFormat)
public WireFormatFactory getWireFormatFactory()
protected OpenWireFormatFactory createWireFormatFactory()
public void setWireFormatFactory(WireFormatFactory wireFormatFactory)
protected java.net.SocketAddress createSocketAddress(java.net.URI location) throws java.net.UnknownHostException
java.net.UnknownHostException
public java.net.URI getDestination()
public void setDestination(java.net.URI destination)
public int getMaxTraceDatagramSize()
public void setMaxTraceDatagramSize(int maxTraceDatagramSize)
public boolean isBroadcast()
public void setBroadcast(boolean broadcast)
public java.net.SocketAddress getAddress()
public void setAddress(java.net.SocketAddress address)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |