org.jactr.core.logging.impl
Class DefaultModelLogger

java.lang.Object
  extended by org.jactr.core.logging.impl.DefaultModelLogger
All Implemented Interfaces:
java.util.EventListener, ILogger, IInitializable, IInstallable, IParameterized, IInstrument

public class DefaultModelLogger
extends java.lang.Object
implements IInstrument, ILogger, IParameterized

demuxing logger

Author:
developer

Field Summary
static java.lang.String ALL
           
static java.lang.String BACKUPS
           
static java.lang.String SIZE
           
 
Constructor Summary
DefaultModelLogger()
           
 
Method Summary
 void flush()
           
 ILogger getLoggerForStream(java.lang.String stream)
           
 java.lang.String getParameter(java.lang.String key)
          return parameter value - null if not defined.
 java.util.Collection<java.lang.String> getPossibleParameters()
          Return all parameters that can be read
 java.util.Collection<java.lang.String> getSetableParameters()
          Return list of all parameters that can be set.
 void initialize()
          intialize this component
 void install(IModel model)
          called by the model during the install(IInstallable) call.
 void log(LogEvent log)
          some logging event has been fired off.
 void setLoggerForStream(java.lang.String stream, ILogger logger)
           
 void setParameter(java.lang.String key, java.lang.String value)
          Set the named parameter
 void uninstall(IModel model)
          remove the element from this model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

BACKUPS

public static final java.lang.String BACKUPS
See Also:
Constant Field Values

SIZE

public static final java.lang.String SIZE
See Also:
Constant Field Values
Constructor Detail

DefaultModelLogger

public DefaultModelLogger()
Method Detail

log

public void log(LogEvent log)
Description copied from interface: ILogger
some logging event has been fired off. The message will be associated with the provided model (possibly null if from the runtime), to be categorized under streamName (should be unique from ILoggable).

Specified by:
log in interface ILogger

getParameter

public java.lang.String getParameter(java.lang.String key)
Description copied from interface: IParameterized
return parameter value - null if not defined.

Specified by:
getParameter in interface IParameterized
Parameters:
key - Description of the Parameter
Returns:
The parameter value

setLoggerForStream

public void setLoggerForStream(java.lang.String stream,
                               ILogger logger)

getLoggerForStream

public ILogger getLoggerForStream(java.lang.String stream)

getPossibleParameters

public java.util.Collection<java.lang.String> getPossibleParameters()
Description copied from interface: IParameterized
Return all parameters that can be read

Specified by:
getPossibleParameters in interface IParameterized
Returns:
The possibleParameters value

getSetableParameters

public java.util.Collection<java.lang.String> getSetableParameters()
Description copied from interface: IParameterized
Return list of all parameters that can be set.

Specified by:
getSetableParameters in interface IParameterized
Returns:
The setableParameters value

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Description copied from interface: IParameterized
Set the named parameter

Specified by:
setParameter in interface IParameterized

install

public void install(IModel model)
Description copied from interface: IInstallable
called by the model during the install(IInstallable) call. Any nondependent initialization should be done at this time. This will likely occur before any chunks,type,buffers,or productions have been added so you should avoid attempting to access them until initialize().

Specified by:
install in interface IInstallable
Specified by:
install in interface IInstrument
Parameters:
model - Description of the Parameter
See Also:
IInstallable.install(org.jactr.core.model.IModel)

uninstall

public void uninstall(IModel model)
Description copied from interface: IInstallable
remove the element from this model. this is called after the model terminates

Specified by:
uninstall in interface IInstallable
Specified by:
uninstall in interface IInstrument
Parameters:
model - Description of the Parameter
See Also:
IInstallable.uninstall(org.jactr.core.model.IModel)

flush

public void flush()
Specified by:
flush in interface ILogger

initialize

public void initialize()
Description copied from interface: IInitializable
intialize this component

Specified by:
initialize in interface IInitializable
Specified by:
initialize in interface IInstrument
See Also:
IInstrument.initialize()