|
||||||||||
| 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 SocketAddress |
address
|
protected boolean |
broadcast
|
protected BrokerId |
brokerId
|
protected URI |
destination
|
protected int |
maxTraceDatagramSize
|
protected DatagramSocket |
socket
|
protected WireFormat |
wireFormat
|
protected WireFormatFactory |
wireFormatFactory
|
| Fields inherited from class org.apache.activemq.broker.MutableBrokerFilter |
|---|
next |
| Constructor Summary | |
|---|---|
UDPTraceBrokerPlugin()
|
|
| Method Summary | |
|---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
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 DatagramSocket |
createSocket()
|
protected SocketAddress |
createSocketAddress(URI location)
|
protected WireFormat |
createWireFormat()
|
protected OpenWireFormatFactory |
createWireFormatFactory()
|
void |
forgetTransaction(ConnectionContext context,
TransactionId xid)
Forgets a transaction. |
SocketAddress |
getAddress()
|
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 |
void |
postProcessDispatch(MessageDispatch messageDispatch)
Notify the Broker that a dispatch has happened |
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction. |
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
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(ProducerBrokerExchange producerExchange,
Message messageSend)
Send a message to the broker to using the specified destination. |
void |
setAddress(SocketAddress address)
|
void |
setBroadcast(boolean broadcast)
|
void |
setDestination(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 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 URI destination
protected DatagramSocket socket
protected BrokerId brokerId
protected SocketAddress address
protected boolean broadcast
| Constructor Detail |
|---|
public UDPTraceBrokerPlugin()
| Method Detail |
|---|
public void start()
throws Exception
start in interface Servicestart in class BrokerPluginSupportException
protected DatagramSocket createSocket()
throws IOException
IOException
public void stop()
throws Exception
stop in interface Servicestop in class BrokerPluginSupportException
public void send(ProducerBrokerExchange producerExchange,
Message messageSend)
throws Exception
Region
send in interface Regionsend in class MutableBrokerFilterproducerExchange - the environment the operation is being executed under.
Exception - TODO
public void acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
throws Exception
Region
acknowledge in interface Regionacknowledge in class MutableBrokerFilterconsumerExchange - the environment the operation is being executed under.
Exception - TODO
public void addConnection(ConnectionContext context,
ConnectionInfo info)
throws Exception
Broker
addConnection in interface BrokeraddConnection in class MutableBrokerFilterException - TODO
public Subscription addConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
addConsumer in interface RegionaddConsumer in class MutableBrokerFiltercontext - the environment the operation is being executed under.
Exception - TODO
public void addDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
Broker
addDestinationInfo in interface BrokeraddDestinationInfo in class MutableBrokerFilterException
public void addProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
Broker
addProducer in interface BrokeraddProducer in interface RegionaddProducer in class MutableBrokerFiltercontext - the enviorment the operation is being executed under.
Exception - TODO
public void addSession(ConnectionContext context,
SessionInfo info)
throws Exception
Broker
addSession in interface BrokeraddSession in class MutableBrokerFilterException - TODO
public void beginTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
beginTransaction in interface BrokerbeginTransaction in class MutableBrokerFilterException - TODO
public void commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
throws Exception
Broker
commitTransaction in interface BrokercommitTransaction in class MutableBrokerFilterException - TODO
public void forgetTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
forgetTransaction in interface BrokerforgetTransaction in class MutableBrokerFilterException
public Response messagePull(ConnectionContext context,
MessagePull pull)
throws Exception
Region
messagePull in interface RegionmessagePull in class MutableBrokerFilterException
public int prepareTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
prepareTransaction in interface BrokerprepareTransaction in class MutableBrokerFilterException - TODOpublic void postProcessDispatch(MessageDispatch messageDispatch)
Broker
postProcessDispatch in interface BrokerpostProcessDispatch in class MutableBrokerFilter
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws Exception
Region
processDispatchNotification in interface RegionprocessDispatchNotification in class MutableBrokerFilterException - TODO
public void removeConnection(ConnectionContext context,
ConnectionInfo info,
Throwable error)
throws Exception
Broker
removeConnection in interface BrokerremoveConnection in class MutableBrokerFiltercontext - 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.
Exception - TODO
public void removeConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
removeConsumer in interface RegionremoveConsumer in class MutableBrokerFiltercontext - the environment the operation is being executed under.
Exception - TODO
public void removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
throws Exception
Region
removeDestination in interface RegionremoveDestination in class MutableBrokerFiltercontext - 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
Exception - TODO
public void removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
Broker
removeDestinationInfo in interface BrokerremoveDestinationInfo in class MutableBrokerFilterException
public void removeProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
Broker
removeProducer in interface BrokerremoveProducer in interface RegionremoveProducer in class MutableBrokerFiltercontext - the enviorment the operation is being executed under.
Exception - TODO
public void removeSession(ConnectionContext context,
SessionInfo info)
throws Exception
Broker
removeSession in interface BrokerremoveSession in class MutableBrokerFilterException - TODO
public void removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
throws Exception
Region
removeSubscription in interface RegionremoveSubscription in class MutableBrokerFiltercontext - the environment the operation is being executed under.info - TODO
Exception - TODO
public void rollbackTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
rollbackTransaction in interface BrokerrollbackTransaction in class MutableBrokerFilterException - TODOpublic WireFormat getWireFormat()
protected WireFormat createWireFormat()
public void setWireFormat(WireFormat wireFormat)
public WireFormatFactory getWireFormatFactory()
protected OpenWireFormatFactory createWireFormatFactory()
public void setWireFormatFactory(WireFormatFactory wireFormatFactory)
protected SocketAddress createSocketAddress(URI location)
throws UnknownHostException
UnknownHostExceptionpublic URI getDestination()
public void setDestination(URI destination)
public int getMaxTraceDatagramSize()
public void setMaxTraceDatagramSize(int maxTraceDatagramSize)
public boolean isBroadcast()
public void setBroadcast(boolean broadcast)
public SocketAddress getAddress()
public void setAddress(SocketAddress address)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||