| Modifier and Type | Class and Description |
|---|---|
| public static enum | SocketHandler.
The type of socket |
| Modifier and Type | Field and Description |
|---|---|
| private InetAddress | |
| private boolean | |
| private ClientSocketFactory | |
| public static final int | |
| private boolean | |
| private int | |
| private SocketHandler. | |
| private SocketFactory | |
| private Writer |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SocketHandler(final String
the hostname to connect to hostname, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final InetAddress
the address to connect to address, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final SocketHandler.
the protocol to connect with protocol,the hostname to connect to hostname, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final SocketHandler.
the protocol to connect with protocol,the address to connect to address, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final SocketFactory socketFactory, final SocketHandler.
the protocol to connect with protocol,the hostname to connect to hostname, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final SocketFactory socketFactory, final SocketHandler.
the protocol to connect with protocol,the address to connect to address, final int the port to connect to port)Creates a socket handler. |
| public | SocketHandler(final ClientSocketFactory
the client socket factory used to create sockets clientSocketFactory, final SocketHandler.the protocol to connect with protocolCreates a socket handler. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements java. Close all child handlers. |
| private OutputStream | |
| protected void | doPublish(final ExtLogRecord
the log record to publish record)Overrides org. Do the actual work of publication; the record will have been filtered already. |
| public void | flush()
Overrides org. Implements java. Flush all child handlers. |
| public InetAddress | |
| private ClientSocketFactory | |
| public int | |
| public SocketHandler. | |
| private void | |
| public boolean | Returns: true if blocking is enabled, otherwise falseIndicates whether or not the output stream is set to block when attempting to reconnect a TCP connection. |
| private void | |
| private void | |
| public void | |
| public void | setBlockOnReconnect(final boolean
true to block when reconnecting or false to reconnect asynchronously
discarding any new messages coming inEnables or disables blocking when attempting to reconnect the socket when using a TCP or SSL TCP connections. |
| public void | setClientSocketFactory(final ClientSocketFactory
the client socket factory to use clientSocketFactory)Sets the client socket factory used to create sockets. |
| public void | setHostname(final String
the host name used to resolve the address hostname)Sets the address to connect to by doing a lookup on the hostname. |
| public void | |
| public void | |
| public void | setSocketFactory(final SocketFactory
the socket factory socketFactory)Sets the socket factory to use for creating TCP or SSL connections. |
| private void | |
| private void |
| address | back to summary |
|---|---|
| private InetAddress address | |
| blockOnReconnect | back to summary |
|---|---|
| private boolean blockOnReconnect | |
| clientSocketFactory | back to summary |
|---|---|
| private ClientSocketFactory clientSocketFactory | |
| DEFAULT_PORT | back to summary |
|---|---|
public static final int DEFAULT_PORT
| |
| initialize | back to summary |
|---|---|
| private boolean initialize | |
| port | back to summary |
|---|---|
| private int port | |
| protocol | back to summary |
|---|---|
| private SocketHandler. | |
| socketFactory | back to summary |
|---|---|
| private SocketFactory socketFactory | |
| writer | back to summary |
|---|---|
| private Writer writer | |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler() throws UnknownHostException Creates a socket handler with an address of localhost and port of 4560.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final String hostname, final int port) throws UnknownHostException Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final InetAddress address, final int port) Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final SocketHandler. Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final SocketHandler. Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final SocketFactory socketFactory, final SocketHandler. Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final SocketFactory socketFactory, final SocketHandler. Creates a socket handler.
| |
| SocketHandler | back to summary |
|---|---|
| public SocketHandler(final ClientSocketFactory clientSocketFactory, final SocketHandler. Creates a socket handler.
| |
| close | back to summary |
|---|---|
| public void close() throws SecurityException Overrides org. Implements java. Doc from org. Close all child handlers.
| |
| createOutputStream | back to summary |
|---|---|
| private OutputStream createOutputStream() | |
| doPublish | back to summary |
|---|---|
| protected void doPublish(final ExtLogRecord record) Overrides org. Doc from org. Do the actual work of publication; the record will have been filtered already. The default implementation
does nothing except to flush if the
| |
| flush | back to summary |
|---|---|
| public void flush() Overrides org. Implements java. Doc from org. Flush all child handlers.
| |
| getAddress | back to summary |
|---|---|
| public InetAddress getAddress() Returns the address being used.
| |
| getClientSocketFactory | back to summary |
|---|---|
| private ClientSocketFactory getClientSocketFactory() | |
| getPort | back to summary |
|---|---|
| public int getPort() Returns the port being used.
| |
| getProtocol | back to summary |
|---|---|
| public SocketHandler. Returns the protocol being used.
| |
| initialize | back to summary |
|---|---|
| private void initialize() | |
| isBlockOnReconnect | back to summary |
|---|---|
| public boolean isBlockOnReconnect() Indicates whether or not the output stream is set to block when attempting to reconnect a TCP connection.
| |
| safeClose | back to summary |
|---|---|
| private void safeClose(Closeable c) | |
| safeFlush | back to summary |
|---|---|
| private void safeFlush(Flushable f) | |
| setAddress | back to summary |
|---|---|
| public void setAddress(final InetAddress address) Sets the address to connect to. Note that is resets the client socket factory.
| |
| setBlockOnReconnect | back to summary |
|---|---|
| public void setBlockOnReconnect(final boolean blockOnReconnect) Enables or disables blocking when attempting to reconnect the socket when using a TCP or SSL TCP connections.
If set to
| |
| setClientSocketFactory | back to summary |
|---|---|
| public void setClientSocketFactory(final ClientSocketFactory clientSocketFactory) Sets the client socket factory used to create sockets. If
| |
| setHostname | back to summary |
|---|---|
| public void setHostname(final String hostname) throws UnknownHostException Sets the address to connect to by doing a lookup on the hostname. Note that is resets the client socket factory.
| |
| setPort | back to summary |
|---|---|
| public void setPort(final int port) Sets the port to connect to. Note that is resets the client socket factory.
| |
| setProtocol | back to summary |
|---|---|
| public void setProtocol(final SocketHandler. Sets the protocol to use. If the value is Note that is resets the socket factory if it was previously set.
| |
| setSocketFactory | back to summary |
|---|---|
| public void setSocketFactory(final SocketFactory socketFactory) Sets the socket factory to use for creating TCP or SSL connections.
Note that if the protocol is set the socket factory will be set to
| |
| writeHead | back to summary |
|---|---|
| private void writeHead(final Writer writer) | |
| writeTail | back to summary |
|---|---|
| private void writeTail(final Writer writer) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final SocketHandler. | SSL_TCP
Transport Layer Security over TCP |
| public static final SocketHandler. | TCP
Transmission Control Protocol |
| public static final SocketHandler. | UDP
User Datagram Protocol |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SocketHandler. | |
| public static SocketHandler. |
| SSL_TCP | back to summary |
|---|---|
| public static final SocketHandler. Transport Layer Security over TCP | |
| TCP | back to summary |
|---|---|
| public static final SocketHandler. Transmission Control Protocol | |
| UDP | back to summary |
|---|---|
| public static final SocketHandler. User Datagram Protocol | |
| Protocol | back to summary |
|---|---|
| private Protocol() | |
| valueOf | back to summary |
|---|---|
| public static SocketHandler. | |
| values | back to summary |
|---|---|
| public static SocketHandler. | |