org.apache.qpid.server.logging.subjects
Class AbstractLogSubject

java.lang.Object
  extended by org.apache.qpid.server.logging.subjects.AbstractLogSubject
All Implemented Interfaces:
LogSubject
Direct Known Subclasses:
BindingLogSubject, ChannelLogSubject, ConnectionLogSubject, ExchangeLogSubject, MessageStoreLogSubject, QueueLogSubject, SubscriptionLogSubject

public abstract class AbstractLogSubject
extends Object
implements LogSubject

The LogSubjects all have a similar requriement to format their output and provide the String value. This Abstract LogSubject provides this basic functionality, allowing the actual LogSubjects to provide their formating and data.


Field Summary
protected  String _logString
          The logString that will be returned via toLogString
 
Constructor Summary
AbstractLogSubject()
           
 
Method Summary
protected  void setLogStringWithFormat(String format, Object... args)
          Set the toString logging of this LogSubject.
 String toLogString()
          toLogString is how the Logging infrastructure will get the text for this LogSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logString

protected String _logString
The logString that will be returned via toLogString

Constructor Detail

AbstractLogSubject

public AbstractLogSubject()
Method Detail

setLogStringWithFormat

protected void setLogStringWithFormat(String format,
                                      Object... args)
Set the toString logging of this LogSubject. Based on a format provided by format and the var args.

Parameters:
format - The Message to format
args - The values to put in to the message.

toLogString

public String toLogString()
toLogString is how the Logging infrastructure will get the text for this LogSubject

Specified by:
toLogString in interface LogSubject
Returns:
String representing this LogSubject


Licensed to the Apache Software Foundation