|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.log4j.spi.ComponentBase
org.apache.log4j.plugins.PluginSkeleton
org.apache.log4j.plugins.Receiver
org.apache.log4j.net.SocketHubReceiver
public class SocketHubReceiver
SocketHubReceiver receives a remote logging event on a configured socket and "posts" it to a LoggerRepository as if the event was generated locally. This class is designed to receive events from the SocketHubAppender 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.
| フィールドの概要 | |
|---|---|
protected boolean |
active
Active. |
protected org.apache.log4j.net.SocketHubReceiver.Connector |
connector
Connector. |
protected java.lang.String |
host
Host. |
protected int |
port
Port. |
protected int |
reconnectionDelay
Reconnection delay. |
protected SocketNode13 |
socketNode
Socket. |
static java.lang.String |
ZONE
The MulticastDNS zone advertised by a SocketHubReceiver |
| クラス org.apache.log4j.plugins.Receiver から継承されたフィールド |
|---|
thresholdLevel |
| クラス org.apache.log4j.plugins.PluginSkeleton から継承されたフィールド |
|---|
name |
| クラス org.apache.log4j.spi.ComponentBase から継承されたフィールド |
|---|
repository |
| コンストラクタの概要 | |
|---|---|
SocketHubReceiver()
Create new instance. |
|
SocketHubReceiver(java.lang.String h,
int p)
Create new instance. |
|
SocketHubReceiver(java.lang.String h,
int p,
org.apache.log4j.spi.LoggerRepository repo)
Create new instance. |
|
| メソッドの概要 | |
|---|---|
void |
activateOptions()
Starts the SocketReceiver with the current options. |
void |
addSocketNodeEventListener(SocketNodeEventListener l)
Adds a SocketNodeEventListener to this receiver to be notified of SocketNode events. |
java.lang.String |
getHost()
Get the remote host to connect to for logging events. |
int |
getPort()
Get the remote port to connect to for logging events. |
int |
getReconnectionDelay()
Returns value of the ReconnectionDelay option. |
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. |
void |
removeSocketNodeEventListener(SocketNodeEventListener l)
Removes a specific SocketNodeEventListener from this instance so that it will no longer be notified of SocketNode events. |
protected void |
setActive(boolean b)
Sets the flag to indicate if receiver is active or not. |
void |
setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS)
|
void |
setHost(java.lang.String remoteHost)
Configures the Host property, this will require activateOptions to be called for this to take effect. |
void |
setPort(int p)
Set the remote port to connect to for logging events. |
void |
setPort(java.lang.String remoteHost)
Set the remote host to connect to for logging events. |
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 |
shutdown()
Called when the receiver should be stopped. |
void |
socketClosedEvent(java.lang.Exception e)
Listen for a socketClosedEvent from the SocketNode. |
void |
socketOpened(java.lang.String remoteInfo)
This method does nothing. |
| クラス org.apache.log4j.plugins.Receiver から継承されたメソッド |
|---|
doPost, 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, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース org.apache.log4j.net.NetworkBased から継承されたメソッド |
|---|
getName, isActive |
| フィールドの詳細 |
|---|
protected java.lang.String host
protected int port
protected int reconnectionDelay
public static final java.lang.String ZONE
protected boolean active
protected org.apache.log4j.net.SocketHubReceiver.Connector connector
protected SocketNode13 socketNode
| コンストラクタの詳細 |
|---|
public SocketHubReceiver()
public SocketHubReceiver(java.lang.String h,
int p)
h - hostp - port
public SocketHubReceiver(java.lang.String h,
int p,
org.apache.log4j.spi.LoggerRepository repo)
h - hostp - portrepo - logger repository| メソッドの詳細 |
|---|
public void addSocketNodeEventListener(SocketNodeEventListener l)
l - listenerpublic void removeSocketNodeEventListener(SocketNodeEventListener l)
l - listenerpublic java.lang.String getHost()
public void setHost(java.lang.String remoteHost)
remoteHost - address of remote host.public void setPort(java.lang.String remoteHost)
remoteHost - address of remote host.public int getPort()
PortBased 内の getPortpublic void setPort(int p)
p - portpublic void setReconnectionDelay(int delay)
Setting this option to zero turns off reconnection capability.
delay - milliseconds to wait or zero to not reconnect.public int getReconnectionDelay()
public 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.
protected void setActive(boolean b)
b - new valuepublic void activateOptions()
org.apache.log4j.spi.OptionHandler 内の activateOptionspublic void shutdown()
org.apache.log4j.plugins.Plugin 内の shutdownpublic void socketClosedEvent(java.lang.Exception e)
SocketNodeEventListener 内の socketClosedEvente - exception not used.public void setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS)
public boolean isAdvertiseViaMulticastDNS()
public void socketOpened(java.lang.String remoteInfo)
SocketNodeEventListener 内の socketOpenedremoteInfo - remote info.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||