Holger's Java API

## com.antelmann.util.logging
Class SocketWriter

    java.lang.Object
      com.antelmann.util.logging.AbstractLogWriter<LogEntry>
          com.antelmann.util.logging.SocketWriter

All Implemented Interfaces:
  Filter<LogEntry>, LogWriter

    public class SocketWriter

extends AbstractLogWriter<LogEntry>

simply used to write serialized LogEntry objects via network

Author:
  Holger Antelmann
See Also:
  `SocketConnection`

Field Summary
`static SimpleHandshake` `handshake`

Fields inherited from class com.antelmann.util.logging.AbstractLogWriter
`filter`

Fields inherited from interface com.antelmann.util.Filter
`EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER`

Constructor Summary
`SocketWriter(String host, int port)`

Method Summary
`SocketConnection` `getSocketConnection()`
`void` `writeLogPattern(LogEntry pattern)` writes the pattern to the log entity.

Methods inherited from class com.antelmann.util.logging.AbstractLogWriter
`accept, getLogFilter, getLogFormatter, setLogFilter, setLogFormatter, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### handshake

    public static final SimpleHandshake handshake

Constructor Detail

### SocketWriter

    public SocketWriter(String host,
                        int port)
                 throws IOException

Throws:
  `IOException`

Method Detail

### getSocketConnection

    public SocketConnection getSocketConnection()

### writeLogPattern

    public void writeLogPattern(LogEntry pattern)
                         throws LogException

  Description copied from class: `AbstractLogWriter`
  writes the pattern to the log entity. If the LogEntryFormatter is null, the pattern is the LogEntry object itself; otherwise, the pattern is the result of formatting the LogEntry with the given LogEntryFormatter.

  Specified by:
    `writeLogPattern` in class `AbstractLogWriter<LogEntry>`
  Throws:
    `LogException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads