Class MulticastReceiver
java.lang.Object
org.apache.log4j.spi.ComponentBase
org.apache.log4j.plugins.PluginSkeleton
org.apache.log4j.plugins.Receiver
org.apache.log4j.net.MulticastReceiver
- All Implemented Interfaces:
AddressBased, NetworkBased, PortBased, Pauseable, Plugin, Component, org.apache.log4j.spi.OptionHandler, Thresholdable
Multicast-based receiver. Accepts LoggingEvents encoded using
MulticastAppender and XMLLayout. The the XML data is converted
back to a LoggingEvent and is posted.
- Author:
- Scott Deboy <sdeboy@apache.org>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe MulticastDNS zone advertised by a MulticastReceiverFields inherited from class Receiver
thresholdLevelFields inherited from class PluginSkeleton
active, nameFields inherited from class ComponentBase
repository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns a String representation of the Address this instance encompasses.Returns value of the Encoding option.intgetPort()Returns the Port # that this net based thing is using.booleanbooleanisPaused()Get paused state.voidsetAddress(String address) 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
-
ZONE
-
-
Constructor Details
-
MulticastReceiver
public MulticastReceiver()
-
-
Method Details
-
getDecoder
-
setDecoder
-
getPort
-
setPort
public void setPort(int port) -
getAddress
Description copied from interface:AddressBasedReturns a String representation of the Address this instance encompasses.- Specified by:
getAddressin interfaceAddressBased- Returns:
- String representation of the Address
-
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. -
shutdown
-
setAddress
-
isPaused
-
setPaused
-
activateOptions
public void activateOptions()- Specified by:
activateOptionsin interfaceorg.apache.log4j.spi.OptionHandler
-
setAdvertiseViaMulticastDNS
public void setAdvertiseViaMulticastDNS(boolean advertiseViaMulticastDNS) -
isAdvertiseViaMulticastDNS
public boolean isAdvertiseViaMulticastDNS()
-