org.apache.activemq.transport
Interface LogWriter

All Known Implementing Classes:
CustomLogWriter, DefaultLogWriter

public interface LogWriter

Interface for classes that will be called by the TransportLogger class to actually write to a log file. Every class that implements this interface has do be declared in the resources/META-INF/services/org/apache/activemq/transport/logwriters directory, by creating a file with the name of the writer (for example "default") and including the line class=org.apache.activemq.transport.logwriters.(Name of the LogWriter class)

Author:
David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com

Method Summary
 void initialMessage(Logger log)
          Writes a header message to the log.
 void logAsyncRequest(Logger log, Object command)
          Writes a message to a log when an asynchronous equest command is sent.
 void logOneWay(Logger log, Object command)
          Writes a message to a log when message is sent.
 void logReceivedCommand(Logger log, Object command)
          Writes a message to a log when message is received.
 void logReceivedException(Logger log, IOException error)
          Writes a message to a log when an exception is received.
 void logRequest(Logger log, Object command)
          Writes a message to a log when a request command is sent.
 void logResponse(Logger log, Object response)
          Writes a message to a log when a response command is received.
 

Method Detail

initialMessage

void initialMessage(Logger log)
Writes a header message to the log.

Parameters:
log - The log to be written to.

logRequest

void logRequest(Logger log,
                Object command)
Writes a message to a log when a request command is sent.

Parameters:
log - The log to be written to.
command - The command to be logged.

logResponse

void logResponse(Logger log,
                 Object response)
Writes a message to a log when a response command is received.

Parameters:
log - The log to be written to.
command - The command to be logged.

logAsyncRequest

void logAsyncRequest(Logger log,
                     Object command)
Writes a message to a log when an asynchronous equest command is sent.

Parameters:
log - The log to be written to.
command - The command to be logged.

logOneWay

void logOneWay(Logger log,
               Object command)
Writes a message to a log when message is sent.

Parameters:
log - The log to be written to.
command - The command to be logged.

logReceivedCommand

void logReceivedCommand(Logger log,
                        Object command)
Writes a message to a log when message is received.

Parameters:
log - The log to be written to.
command - The command to be logged.

logReceivedException

void logReceivedException(Logger log,
                          IOException error)
Writes a message to a log when an exception is received.

Parameters:
log - The log to be written to.
command - The command to be logged.


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.