Package org.apache.activemq.transport
Class TransportLogger
java.lang.Object
org.apache.activemq.transport.TransportFilter
org.apache.activemq.transport.TransportLogger
- All Implemented Interfaces:
org.apache.activemq.Service,org.apache.activemq.transport.Transport,org.apache.activemq.transport.TransportListener
public class TransportLogger
extends org.apache.activemq.transport.TransportFilter
This TransportFilter implementation writes output to a log
as it intercepts commands / events before sending them to the
following layer in the Transport stack.
- Author:
- David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
-
Field Summary
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener -
Constructor Summary
ConstructorsConstructorDescriptionTransportLogger(org.apache.activemq.transport.Transport next, org.slf4j.Logger log, boolean startLogging, org.apache.activemq.transport.LogWriter logWriter) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.activemq.transport.FutureResponseasyncRequest(Object command, org.apache.activemq.transport.ResponseCallback responseCallback) getView()Gets the associated MBean for this TransportLogger.booleanReturns true if logging is activated for this TransportLogger, false otherwise.voidvoidvoidonException(IOException error) voidsetLogging(boolean logging) Sets if logging should be activated for this TransportLogger.voidsetView(TransportLoggerView view) Sets the associated MBean for this TransportLogger.voidstop()toString()Methods inherited from class org.apache.activemq.transport.TransportFilter
getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, setPeerCertificates, setTransportListener, start, transportInterupted, transportResumed, updateURIs
-
Constructor Details
-
TransportLogger
public TransportLogger(org.apache.activemq.transport.Transport next, org.slf4j.Logger log, boolean startLogging, org.apache.activemq.transport.LogWriter logWriter)
-
-
Method Details
-
isLogging
public boolean isLogging()Returns true if logging is activated for this TransportLogger, false otherwise.- Returns:
- true if logging is activated for this TransportLogger, false otherwise.
-
setLogging
public void setLogging(boolean logging) Sets if logging should be activated for this TransportLogger.- Parameters:
logging- true to activate logging, false to deactivate.
-
request
- Specified by:
requestin interfaceorg.apache.activemq.transport.Transport- Overrides:
requestin classorg.apache.activemq.transport.TransportFilter- Throws:
IOException
-
request
- Specified by:
requestin interfaceorg.apache.activemq.transport.Transport- Overrides:
requestin classorg.apache.activemq.transport.TransportFilter- Throws:
IOException
-
asyncRequest
public org.apache.activemq.transport.FutureResponse asyncRequest(Object command, org.apache.activemq.transport.ResponseCallback responseCallback) throws IOException - Specified by:
asyncRequestin interfaceorg.apache.activemq.transport.Transport- Overrides:
asyncRequestin classorg.apache.activemq.transport.TransportFilter- Throws:
IOException
-
oneway
- Specified by:
onewayin interfaceorg.apache.activemq.transport.Transport- Overrides:
onewayin classorg.apache.activemq.transport.TransportFilter- Throws:
IOException
-
onCommand
- Specified by:
onCommandin interfaceorg.apache.activemq.transport.TransportListener- Overrides:
onCommandin classorg.apache.activemq.transport.TransportFilter
-
onException
- Specified by:
onExceptionin interfaceorg.apache.activemq.transport.TransportListener- Overrides:
onExceptionin classorg.apache.activemq.transport.TransportFilter
-
getView
Gets the associated MBean for this TransportLogger.- Returns:
- the associated MBean for this TransportLogger.
-
setView
Sets the associated MBean for this TransportLogger.- Parameters:
view- the associated MBean for this TransportLogger.
-
toString
- Overrides:
toStringin classorg.apache.activemq.transport.TransportFilter
-
stop
- Specified by:
stopin interfaceorg.apache.activemq.Service- Overrides:
stopin classorg.apache.activemq.transport.TransportFilter- Throws:
Exception
-