|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
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).
This receiver supports log files created using log4j's XMLLayout, as well as java.util.logging XMLFormatter (via the org.apache.log4j.spi.Decoder interface).
By default, log4j's XMLLayout is supported (no need to specify a decoder in that case).
To configure this receiver to support java.util.logging's XMLFormatter, specify a 'decoder' param of org.apache.log4j.xml.UtilLoggingXMLDecoder.
Once the event has been "posted", it will be handled by the appenders currently configured in the LoggerRespository.
| フィールドの概要 | |
|---|---|
protected boolean |
active
|
protected java.lang.String |
decoder
|
static int |
DEFAULT_PORT
|
protected int |
port
|
static java.lang.String |
ZONE
The MulticastDNS zone advertised by an XMLSocketReceiver |
| クラス org.apache.log4j.plugins.Receiver から継承されたフィールド |
|---|
thresholdLevel |
| クラス org.apache.log4j.plugins.PluginSkeleton から継承されたフィールド |
|---|
name |
| クラス org.apache.log4j.spi.ComponentBase から継承されたフィールド |
|---|
repository |
| コンストラクタの概要 | |
|---|---|
XMLSocketReceiver()
|
|
XMLSocketReceiver(int _port)
|
|
XMLSocketReceiver(int _port,
org.apache.log4j.spi.LoggerRepository _repository)
|
|
| メソッドの概要 | |
|---|---|
void |
activateOptions()
Starts the SocketReceiver with the current options. |
void |
doPost(org.apache.log4j.spi.LoggingEvent event)
|
java.lang.String |
getDecoder()
|
int |
getPort()
Get the port to receive logging events on. |
int |
hashCode()
|
boolean |
isAdvertiseViaMulticastDNS()
|
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. |
protected void |
setActive(boolean b)
Sets the flag to indicate if receiver is active or not. |
void |
setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS)
|
void |
setDecoder(java.lang.String _decoder)
Specify the class name implementing org.apache.log4j.spi.Decoder that can process the file. |
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. |
| クラス org.apache.log4j.plugins.Receiver から継承されたメソッド |
|---|
getThreshold, isAsSevereAsThreshold, setThreshold |
| クラス org.apache.log4j.plugins.PluginSkeleton から継承されたメソッド |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, isActive, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName |
| クラス org.apache.log4j.spi.ComponentBase から継承されたメソッド |
|---|
getLogger, getNonFloodingLogger, resetErrorCount |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| インタフェース org.apache.log4j.net.NetworkBased から継承されたメソッド |
|---|
getName, isActive |
| フィールドの詳細 |
|---|
protected boolean active
protected java.lang.String decoder
public static final int DEFAULT_PORT
protected int port
public static final java.lang.String ZONE
| コンストラクタの詳細 |
|---|
public XMLSocketReceiver()
public XMLSocketReceiver(int _port)
public XMLSocketReceiver(int _port,
org.apache.log4j.spi.LoggerRepository _repository)
| メソッドの詳細 |
|---|
public int getPort()
PortBased 内の getPortpublic void setPort(int _port)
public java.lang.String getDecoder()
public void setDecoder(java.lang.String _decoder)
public boolean isPaused()
org.apache.log4j.plugins.Pauseable 内の isPausedpublic void setPaused(boolean b)
org.apache.log4j.plugins.Pauseable 内の setPausedpublic boolean isEquivalent(org.apache.log4j.plugins.Plugin testPlugin)
org.apache.log4j.plugins.Plugin 内の isEquivalentorg.apache.log4j.plugins.PluginSkeleton 内の isEquivalenttestPlugin - The plugin to test equivalency against.
public int hashCode()
java.lang.Object 内の hashCodeprotected void setActive(boolean b)
b - new valuepublic void activateOptions()
org.apache.log4j.spi.OptionHandler 内の activateOptionspublic void setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS)
public boolean isAdvertiseViaMulticastDNS()
public void shutdown()
org.apache.log4j.plugins.Plugin 内の shutdownpublic void run()
java.lang.Runnable 内の runpublic void doPost(org.apache.log4j.spi.LoggingEvent event)
org.apache.log4j.plugins.Receiver 内の doPost
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||