|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.transport.TransportFilter
org.apache.activemq.transport.TransportLogger
public class TransportLogger
This TransportFilter implementation writes output to a log as it intercepts commands / events before sending them to the following layer in the Transport stack.
| Field Summary |
|---|
| Fields inherited from class org.apache.activemq.transport.TransportFilter |
|---|
next, transportListener |
| Constructor Summary | |
|---|---|
TransportLogger(Transport next,
org.slf4j.Logger log,
boolean startLogging,
LogWriter logWriter)
|
|
| Method Summary | |
|---|---|
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
|
void |
finalize()
We need to override this method so that we can unregister the associated MBean to avoid a memory leak. |
TransportLoggerView |
getView()
Gets the associated MBean for this TransportLogger. |
boolean |
isLogging()
Returns true if logging is activated for this TransportLogger, false otherwise. |
void |
onCommand(Object command)
|
void |
oneway(Object command)
|
void |
onException(IOException error)
|
Object |
request(Object command)
|
Object |
request(Object command,
int timeout)
|
void |
setLogging(boolean logging)
Sets if logging should be activated for this TransportLogger. |
void |
setView(TransportLoggerView view)
Sets the associated MBean for this TransportLogger. |
String |
toString()
|
| Methods inherited from class org.apache.activemq.transport.TransportFilter |
|---|
getNext, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, setTransportListener, start, stop, transportInterupted, transportResumed, updateURIs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TransportLogger(Transport next,
org.slf4j.Logger log,
boolean startLogging,
LogWriter logWriter)
| Method Detail |
|---|
public boolean isLogging()
public void setLogging(boolean logging)
logging - true to activate logging, false to deactivate.
public Object request(Object command)
throws IOException
request in interface Transportrequest in class TransportFilterIOException
public Object request(Object command,
int timeout)
throws IOException
request in interface Transportrequest in class TransportFilterIOException
public FutureResponse asyncRequest(Object command,
ResponseCallback responseCallback)
throws IOException
asyncRequest in interface TransportasyncRequest in class TransportFilterIOException
public void oneway(Object command)
throws IOException
oneway in interface Transportoneway in class TransportFilterIOExceptionpublic void onCommand(Object command)
onCommand in interface TransportListeneronCommand in class TransportFilterpublic void onException(IOException error)
onException in interface TransportListeneronException in class TransportFilterpublic TransportLoggerView getView()
public void setView(TransportLoggerView view)
view - the associated MBean for this TransportLogger.public String toString()
toString in class TransportFilter
public void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||