|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<E>
ch.qos.logback.core.net.SocketAppenderBase<E>
public abstract class SocketAppenderBase<E>
This is the base class for module specific SocketAppender implementations.
Field Summary | |
---|---|
protected InetAddress |
address
|
protected int |
counter
|
protected ObjectOutputStream |
oos
|
protected int |
port
|
protected int |
reconnectionDelay
|
protected String |
remoteHost
We remember host name as String in addition to the resolved InetAddress so that it can be returned via getOption(). |
Fields inherited from class ch.qos.logback.core.AppenderBase |
---|
name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
SocketAppenderBase()
|
Method Summary | |
---|---|
protected void |
append(E event)
|
void |
cleanUp()
Drop the connection to the remote host and release the underlying connector thread if it has been created |
protected static InetAddress |
getAddressByName(String host)
|
int |
getPort()
Returns value of the Port option. |
protected abstract PreSerializationTransformer<E> |
getPST()
|
int |
getReconnectionDelay()
Returns value of the ReconnectionDelay option. |
String |
getRemoteHost()
Returns value of the RemoteHost option. |
protected abstract void |
postProcessEvent(E event)
|
void |
setPort(int port)
The Port option takes a positive integer representing the port where the server is waiting for connections. |
void |
setReconnectionDelay(int delay)
The ReconnectionDelay option takes a positive integer representing the number of milliseconds to wait between each failed connection attempt to the server. |
void |
setRemoteHost(String host)
The RemoteHost option takes a string value which should be the host name of the server where a SocketNode is running. |
void |
start()
Start this appender. |
void |
stop()
Strop this appender. |
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Field Detail |
---|
protected String remoteHost
protected InetAddress address
protected int port
protected ObjectOutputStream oos
protected int reconnectionDelay
protected int counter
Constructor Detail |
---|
public SocketAppenderBase()
Method Detail |
---|
public void start()
start
in interface LifeCycle
start
in class AppenderBase<E>
public void stop()
This will mark the appender as closed and call then cleanUp()
method.
stop
in interface LifeCycle
stop
in class AppenderBase<E>
public void cleanUp()
protected void append(E event)
append
in class AppenderBase<E>
protected abstract void postProcessEvent(E event)
protected abstract PreSerializationTransformer<E> getPST()
protected static InetAddress getAddressByName(String host)
public void setRemoteHost(String host)
SocketNode
is running.
public String getRemoteHost()
public void setPort(int port)
public int getPort()
public void setReconnectionDelay(int delay)
Setting this option to zero turns off reconnection capability.
public int getReconnectionDelay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |