com.sap.tc.logging
Class BaseLog

java.lang.Object
  |
  +--com.sap.tc.logging.ExceptionHandling
        |
        +--com.sap.tc.logging.BaseLog
All Implemented Interfaces:
java.lang.Cloneable, IBaseLog, IObjectInfo
Direct Known Subclasses:
ReadLog

public abstract class BaseLog
extends ExceptionHandling
implements IBaseLog


Field Summary
static int STATUS_CLOSED
           
static int STATUS_INVALID
           
static int STATUS_OPENED
           
 
Constructor Summary
BaseLog()
           
 
Method Summary
 void addFilter(IFilter filter)
          Adds another filter that controls messages flow via this log.
 void close()
          Closes this log object.
 java.lang.String getDescription()
           
 java.lang.String getEncoding()
          Gets the canonical name of the character encoding that is used for this log.
 IFilter getFilter(int index)
          Gets the filter that control messages flow via this log.
 java.util.Collection getFilters()
          Gets the filters that control messages flow via this log.
 java.lang.String getFooter()
          Sets the footer text of this log.
 Formatter getFormatter()
          Gets the formatter that dictates the format of log records in this log.
 java.lang.String getHeader()
          Gets the header text of this log.
 int getMode()
          Get current working mode
 java.lang.String getName()
           
 java.lang.String getPattern()
          Gets the name pattern of this file log.
 java.lang.String getSource()
          Gets the source name of this file log.
 java.lang.String getVerInUse()
           
 boolean isClosed()
          Check is this log closed.
 boolean isOpened()
          Check is this log opened.
 void open()
          Open this log object.
 void removeFilter(IFilter filter)
          Removes a filter so that it no longer controls messages flow via this log.
 void removeFilters()
          Removes all filters associated with this log.
 void setDescription(java.lang.String value)
           
 void setEncoding(java.lang.String encoding)
          Sets the named character encoding to be used for this log.
 void setFormatter(Formatter formatter)
          Sets the formatter that dictates the format of log records in this log.
 void setMode(int mode)
          Set current working mode.
 void setName(java.lang.String value)
           
 void setPattern(java.lang.String value)
          Sets the name pattern of this log.
 void setSource(java.lang.String value)
          Sets the source name of this log.
 int status()
          Status of this log object.
 
Methods inherited from class com.sap.tc.logging.ExceptionHandling
getException, getExceptions, handleException, handleException, resetException, throwException
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_INVALID

public static final int STATUS_INVALID

STATUS_CLOSED

public static final int STATUS_CLOSED

STATUS_OPENED

public static final int STATUS_OPENED
Constructor Detail

BaseLog

public BaseLog()
Method Detail

open

public void open()
          throws OpenException
Description copied from interface: IBaseLog
Open this log object.
Specified by:
open in interface IBaseLog
See Also:
IBaseLog.open()

close

public void close()
           throws CloseException
Description copied from interface: IBaseLog
Closes this log object.
Specified by:
close in interface IBaseLog
See Also:
IBaseLog.close()

status

public int status()
Description copied from interface: IBaseLog
Status of this log object.
Specified by:
status in interface IBaseLog
See Also:
IBaseLog.status()

isClosed

public boolean isClosed()
Description copied from interface: IBaseLog
Check is this log closed.
Specified by:
isClosed in interface IBaseLog
See Also:
IBaseLog.isClosed()

isOpened

public boolean isOpened()
Description copied from interface: IBaseLog
Check is this log opened.
Specified by:
isOpened in interface IBaseLog
See Also:
IBaseLog.isOpened()

setPattern

public void setPattern(java.lang.String value)
Description copied from interface: IBaseLog
Sets the name pattern of this log.
Specified by:
setPattern in interface IBaseLog
See Also:
IBaseLog.setPattern(java.lang.String)

getPattern

public java.lang.String getPattern()
Description copied from interface: IBaseLog
Gets the name pattern of this file log.
Specified by:
getPattern in interface IBaseLog
See Also:
IBaseLog.getPattern()

setSource

public void setSource(java.lang.String value)
Description copied from interface: IBaseLog
Sets the source name of this log. Source name represent a source where messages will be written, or from where messages will be read. Full source name will be built based on given pattern.
Specified by:
setSource in interface IBaseLog
See Also:
IBaseLog.setSource(java.lang.String)

getSource

public java.lang.String getSource()
Description copied from interface: IBaseLog
Gets the source name of this file log.
Specified by:
getSource in interface IBaseLog
See Also:
IBaseLog.getSource()

setEncoding

public void setEncoding(java.lang.String encoding)
Description copied from interface: IBaseLog
Sets the named character encoding to be used for this log. If no character encoding is set the default character encoding is used.
Specified by:
setEncoding in interface IBaseLog
See Also:
IBaseLog.setEncoding(java.lang.String)

getEncoding

public java.lang.String getEncoding()
Description copied from interface: IBaseLog
Gets the canonical name of the character encoding that is used for this log. If no character encoding is set the default character encoding of the platform is used.
Specified by:
getEncoding in interface IBaseLog
See Also:
IBaseLog.getEncoding()

setFormatter

public void setFormatter(Formatter formatter)
Description copied from interface: IBaseLog
Sets the formatter that dictates the format of log records in this log.
Specified by:
setFormatter in interface IBaseLog
See Also:
IBaseLog.setFormatter(com.sap.tc.logging.Formatter)

getFormatter

public Formatter getFormatter()
Description copied from interface: IBaseLog
Gets the formatter that dictates the format of log records in this log.
Specified by:
getFormatter in interface IBaseLog
See Also:
IBaseLog.getFormatter()

getFooter

public java.lang.String getFooter()
Description copied from interface: IBaseLog
Sets the footer text of this log.
Specified by:
getFooter in interface IBaseLog
See Also:
IBaseLog.getFooter()

getHeader

public java.lang.String getHeader()
Description copied from interface: IBaseLog
Gets the header text of this log.
Specified by:
getHeader in interface IBaseLog
See Also:
IBaseLog.getHeader()

getMode

public int getMode()
Description copied from interface: IBaseLog
Get current working mode
Specified by:
getMode in interface IBaseLog
See Also:
IBaseLog.getMode()

setMode

public void setMode(int mode)
Description copied from interface: IBaseLog
Set current working mode.
Specified by:
setMode in interface IBaseLog
See Also:
com.sap.tc.logging.interfaces.IBaseLog#setMode()

addFilter

public void addFilter(IFilter filter)
Description copied from interface: IBaseLog
Adds another filter that controls messages flow via this log. The results of all filters for a given message are logically anded to determine whether a message is to be processed.
Specified by:
addFilter in interface IBaseLog
See Also:
IBaseLog.addFilter(com.sap.tc.logging.interfaces.IFilter)

getFilter

public IFilter getFilter(int index)
Description copied from interface: IBaseLog
Gets the filter that control messages flow via this log.
Specified by:
getFilter in interface IBaseLog
See Also:
com.sap.tc.logging.interfaces.IBaseLog#getFilter()

getFilters

public java.util.Collection getFilters()
Description copied from interface: IBaseLog
Gets the filters that control messages flow via this log.
Specified by:
getFilters in interface IBaseLog
See Also:
IBaseLog.getFilters()

removeFilter

public void removeFilter(IFilter filter)
Description copied from interface: IBaseLog
Removes a filter so that it no longer controls messages flow via this log.
Specified by:
removeFilter in interface IBaseLog
See Also:
IBaseLog.removeFilter(com.sap.tc.logging.interfaces.IFilter)

removeFilters

public void removeFilters()
Description copied from interface: IBaseLog
Removes all filters associated with this log.
Specified by:
removeFilters in interface IBaseLog
See Also:
IBaseLog.removeFilters()

setName

public void setName(java.lang.String value)
See Also:
com.sap.tc.logging.interfaces.IObjectInfo#setName(java.lang.String)

getName

public java.lang.String getName()
Specified by:
getName in interface IObjectInfo
See Also:
IObjectInfo.getName()

setDescription

public void setDescription(java.lang.String value)
See Also:
com.sap.tc.logging.interfaces.IObjectInfo#setDescription(java.lang.String)

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface IObjectInfo
See Also:
IObjectInfo.getDescription()

getVerInUse

public java.lang.String getVerInUse()
Specified by:
getVerInUse in interface IObjectInfo
See Also:
IObjectInfo.getVerInUse()