Class UDPReceiver
java.lang.Object
org.apache.log4j.spi.ComponentBase
org.apache.log4j.plugins.PluginSkeleton
org.apache.log4j.plugins.Receiver
org.apache.log4j.net.UDPReceiver
- All Implemented Interfaces:
NetworkBased, PortBased, Pauseable, Plugin, Component, org.apache.log4j.spi.OptionHandler, Thresholdable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final StringThe MulticastDNS zone advertised by a UDPReceiverFields inherited from class Receiver
thresholdLevelFields inherited from class PluginSkeleton
active, nameFields inherited from class ComponentBase
repository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns true if this receiver is active.Returns value of the Encoding option.intgetPort()Returns the Port # that this net based thing is using.booleanbooleanisPaused()Get paused state.voidsetAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS) voidsetDecoder(String decoder) voidsetEncoding(String encoding) The Encoding option specifies how the bytes are encoded.voidsetPaused(boolean b) Set paused state.voidsetPort(int port) voidshutdown()Call when the plugin should be stopped.Methods inherited from class Receiver
doPost, getThreshold, isAsSevereAsThreshold, setThresholdMethods inherited from class PluginSkeleton
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, isActive, isEquivalent, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setNameMethods inherited from class ComponentBase
getLogger, getNonFloodingLogger, resetErrorCountMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NetworkBased
getName, isActive
-
Field Details
-
paused
protected boolean paused -
ZONE
-
-
Constructor Details
-
UDPReceiver
public UDPReceiver()
-
-
Method Details
-
getPort
-
setPort
public void setPort(int port) -
setEncoding
The Encoding option specifies how the bytes are encoded. If this option is not specified, the system encoding will be used. -
getEncoding
Returns value of the Encoding option. -
getDecoder
-
setDecoder
-
isPaused
-
setPaused
-
setAdvertiseViaMulticastDNS
public void setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS) -
isAdvertiseViaMulticastDNS
public boolean isAdvertiseViaMulticastDNS() -
shutdown
-
activateOptions
public void activateOptions()Returns true if this receiver is active.- Specified by:
activateOptionsin interfaceorg.apache.log4j.spi.OptionHandler
-