|
Log4j 2.0alpha-1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log4j.spi.ComponentBase
org.apache.log4j.plugins.PluginSkeleton
org.apache.log4j.plugins.Receiver
org.apache.log4j.net.XMLSocketReceiver
public class XMLSocketReceiver
XMLSocketReceiver receives a remote logging event via XML on a configured socket and "posts" it to a LoggerRepository as if the event were generated locally. This class is designed to receive events from the XMLSocketAppender class (or classes that send compatible events).
Once the event has been "posted", it will be handled by the appenders currently configured in the LoggerRespository.
| Field Summary | |
|---|---|
protected boolean |
active
|
protected java.lang.String |
decoder
|
static int |
DEFAULT_PORT
|
protected int |
port
|
| Fields inherited from class org.apache.log4j.plugins.Receiver |
|---|
thresholdLevel |
| Fields inherited from class org.apache.log4j.plugins.PluginSkeleton |
|---|
name |
| Fields inherited from class org.apache.log4j.spi.ComponentBase |
|---|
repository |
| Constructor Summary | |
|---|---|
XMLSocketReceiver()
|
|
XMLSocketReceiver(int _port)
|
|
XMLSocketReceiver(int _port,
org.apache.log4j.spi.LoggerRepository _repository)
|
|
| Method Summary | |
|---|---|
void |
activateOptions()
Starts the SocketReceiver with the current options. |
void |
doPost(org.apache.log4j.spi.LoggingEvent event)
Posts the logging event to a logger in the configured logger repository. |
java.lang.String |
getDecoder()
|
int |
getPort()
Get the port to receive logging events on. |
int |
hashCode()
|
boolean |
isActive()
Returns true if this receiver is active. |
boolean |
isEquivalent(org.apache.log4j.plugins.Plugin testPlugin)
Returns true if the receiver is the same class and they are configured for the same properties, and super class also considers them to be equivalent. |
boolean |
isPaused()
|
void |
run()
Loop, accepting new socket connections. |
void |
setDecoder(java.lang.String _decoder)
|
void |
setPaused(boolean b)
|
void |
setPort(int _port)
Set the port to receive logging events on. |
void |
shutdown()
Called when the receiver should be stopped. |
| Methods inherited from class org.apache.log4j.plugins.Receiver |
|---|
getThreshold, isAsSevereAsThreshold, setThreshold |
| Methods inherited from class org.apache.log4j.plugins.PluginSkeleton |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName |
| Methods inherited from class org.apache.log4j.spi.ComponentBase |
|---|
getLogger, getNonFloodingLogger, resetErrorCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.log4j.net.NetworkBased |
|---|
getName |
| Field Detail |
|---|
protected boolean active
protected java.lang.String decoder
public static final int DEFAULT_PORT
protected int port
| Constructor Detail |
|---|
public XMLSocketReceiver()
public XMLSocketReceiver(int _port)
public XMLSocketReceiver(int _port,
org.apache.log4j.spi.LoggerRepository _repository)
| Method Detail |
|---|
public int getPort()
getPort in interface org.apache.log4j.net.PortBasedpublic void setPort(int _port)
public java.lang.String getDecoder()
public void setDecoder(java.lang.String _decoder)
public boolean isPaused()
isPaused in interface org.apache.log4j.plugins.Pauseablepublic void setPaused(boolean b)
setPaused in interface org.apache.log4j.plugins.Pauseablepublic boolean isEquivalent(org.apache.log4j.plugins.Plugin testPlugin)
isEquivalent in interface org.apache.log4j.plugins.PluginisEquivalent in class org.apache.log4j.plugins.PluginSkeletontestPlugin - The plugin to test equivalency against.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isActive()
isActive in interface org.apache.log4j.net.NetworkBasedisActive in interface org.apache.log4j.plugins.PluginisActive in class org.apache.log4j.plugins.PluginSkeletonpublic void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandlerpublic void shutdown()
shutdown in interface org.apache.log4j.plugins.Pluginpublic void run()
run in interface java.lang.Runnablepublic void doPost(org.apache.log4j.spi.LoggingEvent event)
Receiver
doPost in class Receiverevent - the log event to post to the local log4j environment.
|
Log4j 2.0alpha-1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||