org.javagroups.log
Class NetworkTracer

java.lang.Object
  |
  +--org.javagroups.log.Tracer
        |
        +--org.javagroups.log.NetworkTracer

public class NetworkTracer
extends Tracer

Provides output to a socket. All methods defined here have permissions that are either protected or package. When close is called on this Tracer the socket used by it will also be closed.


Field Summary
protected  java.net.Socket out
           
 
Fields inherited from class org.javagroups.log.Tracer
autoFlush, closed, level, module, timestampFormat
 
Method Summary
protected  void doClose()
          Flushes any pending output (by calling flush) and closes the output file, stream, writer, or socket associated with this tracer.
protected  void doFlush()
          Flushes any pending output.
protected  void doPrint(java.lang.String message)
          Sends the already-formatted message to the output file, stream, writer, or socket associated with this tracer.
 
Methods inherited from class org.javagroups.log.Tracer
close, flush, getAutoFlush, getLevel, getModule, logString, logString, print, print, setAutoFlush, setLevel, setTimestampFormat, timestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.net.Socket out
Method Detail

doPrint

protected void doPrint(java.lang.String message)
Sends the already-formatted message to the output file, stream, writer, or socket associated with this tracer. In case of an IO exception an error message is printed to the System.err stream

Specified by:
doPrint in class Tracer
Parameters:
message - a formatted string

doFlush

protected void doFlush()
Flushes any pending output. Called from flush, but only if not alread closed. This call flushes the output stream of the socket ie. socket.getOutputStream().flush() In case of an IO error, an error message is sent to System.err

Specified by:
doFlush in class Tracer

doClose

protected void doClose()
Flushes any pending output (by calling flush) and closes the output file, stream, writer, or socket associated with this tracer. Called from close, but only if not alread closed.

After closed has been called, all calls to print, flush, and close are ignored. In case of an IO error, an error message is sent to System.err

Specified by:
doClose in class Tracer


Copyright ? 2001,2002 www.javagroups.com . All Rights Reserved.