simtools.logging
Class SocketBufferHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by simtools.logging.LoggingEntryByteBuffer.Handler
          extended by simtools.logging.SocketBufferHandler

public class SocketBufferHandler
extends LoggingEntryByteBuffer.Handler


Field Summary
protected  java.nio.channels.SocketChannel channel
           
protected  java.lang.String host
           
protected  int port
           
 
Constructor Summary
SocketBufferHandler(java.lang.String host, int port)
           
 
Method Summary
 void close()
           
protected  void connect()
           
 void flush()
           
protected  void write(java.nio.ByteBuffer bb)
           
 
Methods inherited from class simtools.logging.LoggingEntryByteBuffer.Handler
publish
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected java.lang.String host

port

protected int port

channel

protected java.nio.channels.SocketChannel channel
Constructor Detail

SocketBufferHandler

public SocketBufferHandler(java.lang.String host,
                           int port)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

connect

protected void connect()
                throws java.io.IOException
Throws:
java.io.IOException

write

protected void write(java.nio.ByteBuffer bb)
              throws java.io.IOException
Specified by:
write in class LoggingEntryByteBuffer.Handler
Throws:
java.io.IOException

close

public void close()
           throws java.lang.SecurityException
Specified by:
close in class java.util.logging.Handler
Throws:
java.lang.SecurityException

flush

public void flush()
Specified by:
flush in class java.util.logging.Handler