© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com

com.bitfactoryinc.logging
Class SerialSocketLogger

java.lang.Object
  |
  +--com.bitfactoryinc.logging.Logger
        |
        +--com.bitfactoryinc.logging.SerialLogger
              |
              +--com.bitfactoryinc.logging.SerialSocketLogger

public class SerialSocketLogger
extends SerialLogger

Instances of this class write out serialized LogEntries to a Socket

See Also:
LogSocketReader

Field Summary
private  java.lang.String hostName
           
private  int port
           
private  java.net.Socket socket
           
 
Fields inherited from class com.bitfactoryinc.logging.SerialLogger
out
 
Fields inherited from class com.bitfactoryinc.logging.Logger
application, defaultFilterClass, defaultFormatterClass, enabled, filter, formatter
 
Constructor Summary
SerialSocketLogger(java.lang.String aHostName, int aPort)
           
 
Method Summary
 java.lang.String getHostName()
           
 int getPort()
           
 java.net.Socket getSocket()
           
protected  boolean handleLogFailure(LogEntry aLogEntry, java.lang.Exception ex)
          reset the socket and try one more time
protected  void resetSocket()
           
 void setHostName(java.lang.String newHostName)
           
 void setPort(int newPort)
           
 void setSocket(java.net.Socket newSocket)
           
protected  void tryToResetSocket()
           
 
Methods inherited from class com.bitfactoryinc.logging.SerialLogger
doLog, finalize, getOut, setOut, setOut, tryToLog
 
Methods inherited from class com.bitfactoryinc.logging.Logger
getApplication, getDefaultFilterClass, getDefaultFormatterClass, getFilter, getFormatter, getSeverityThreshold, isEnabled, log, log, log, logCritical, logCritical, logDebug, logDebug, logError, logError, logFatal, logFatal, logInfo, logInfo, logStatus, logStatus, logWarning, logWarning, setApplication, setDefaultFilter, setDefaultFilterClass, setDefaultFormatter, setDefaultFormatterClass, setEnabled, setFilter, setFormatter, setSeverityThreshold, shouldLog, writeToLog
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

socket

private java.net.Socket socket

hostName

private java.lang.String hostName

port

private int port
Constructor Detail

SerialSocketLogger

public SerialSocketLogger(java.lang.String aHostName,
                          int aPort)
Method Detail

getHostName

public java.lang.String getHostName()

getPort

public int getPort()

getSocket

public java.net.Socket getSocket()

handleLogFailure

protected boolean handleLogFailure(LogEntry aLogEntry,
                                   java.lang.Exception ex)
reset the socket and try one more time
Overrides:
handleLogFailure in class SerialLogger

resetSocket

protected void resetSocket()

setHostName

public void setHostName(java.lang.String newHostName)

setPort

public void setPort(int newPort)

setSocket

public void setSocket(java.net.Socket newSocket)

tryToResetSocket

protected void tryToResetSocket()
                         throws java.lang.Exception

© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com