org.griphyn.cPlanner.common
Class DefaultStreamGobblerCallback

java.lang.Object
  extended by org.griphyn.cPlanner.common.DefaultStreamGobblerCallback
All Implemented Interfaces:
StreamGobblerCallback

public class DefaultStreamGobblerCallback
extends Object
implements StreamGobblerCallback

The default callback for the stream gobbler, that logs all the messages to a particular logging level. By default all the messages are logged onto the DEBUG level.

Version:
$Revision: 50 $
Author:
Karan Vahi

Field Summary
private  int mLevel
          The level on which the messages are to be logged.
private  LogManager mLogger
          The instance to the logger to log messages.
 
Constructor Summary
DefaultStreamGobblerCallback(int level)
          The overloaded constructor.
 
Method Summary
 void work(String line)
          Callback whenever a line is read from the stream by the StreamGobbler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLevel

private int mLevel
The level on which the messages are to be logged.


mLogger

private LogManager mLogger
The instance to the logger to log messages.

Constructor Detail

DefaultStreamGobblerCallback

public DefaultStreamGobblerCallback(int level)
The overloaded constructor.

Parameters:
level - the level on which to log.
Method Detail

work

public void work(String line)
Callback whenever a line is read from the stream by the StreamGobbler. The line is logged to the level specified while initializing the class.

Specified by:
work in interface StreamGobblerCallback
Parameters:
line - the line that is read.


Copyright © 2007 The University of Southern California. All Rights Reserved.