org.apache.log4j.net
Class UDPReceiver
java.lang.Object
|
+--org.apache.log4j.plugins.PluginSkeleton
|
+--org.apache.log4j.plugins.Receiver
|
+--org.apache.log4j.net.UDPReceiver
- All Implemented Interfaces:
- NetworkBased, OptionHandler, Pauseable, Plugin, PortBased, Thresholdable
- public class UDPReceiver
- extends Receiver
- implements PortBased, Pauseable
Receive LoggingEvents encoded with an XMLLayout, convert the XML data to a
LoggingEvent and post the LoggingEvent.
- Author:
- Scott Deboy
Field Summary |
protected boolean |
paused
|
Method Summary |
void |
activateOptions()
Returns true if this receiver is active. |
java.lang.String |
getDecoder()
|
java.lang.String |
getEncoding()
Returns value of the Encoding option. |
int |
getPort()
Returns the Port # that this net based thing is using |
boolean |
isPaused()
|
void |
setDecoder(java.lang.String decoder)
|
void |
setEncoding(java.lang.String encoding)
The Encoding option specifies how the bytes are encoded. |
void |
setPaused(boolean b)
|
void |
setPort(int port)
|
void |
shutdown()
Call when the plugin should be stopped. |
Methods inherited from class org.apache.log4j.plugins.PluginSkeleton |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, isActive, isEquivalent, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
paused
protected boolean paused
UDPReceiver
public UDPReceiver()
getPort
public int getPort()
- Description copied from interface:
PortBased
- Returns the Port # that this net based thing is using
- Specified by:
getPort
in interface PortBased
- Returns:
- int port number
setPort
public void setPort(int port)
setEncoding
public void setEncoding(java.lang.String encoding)
- The Encoding option specifies how the bytes are encoded. If this
option is not specified, the system encoding will be used.
getEncoding
public java.lang.String getEncoding()
- Returns value of the Encoding option.
getDecoder
public java.lang.String getDecoder()
setDecoder
public void setDecoder(java.lang.String decoder)
isPaused
public boolean isPaused()
- Specified by:
isPaused
in interface Pauseable
setPaused
public void setPaused(boolean b)
- Specified by:
setPaused
in interface Pauseable
shutdown
public void shutdown()
- Description copied from interface:
Plugin
- Call when the plugin should be stopped.
- Specified by:
shutdown
in interface Plugin
activateOptions
public void activateOptions()
- Returns true if this receiver is active.
- Specified by:
activateOptions
in interface OptionHandler
Copyright 2000-2003 Apache Software Foundation.