Log4j 2.0alpha-1

org.apache.log4j.net
Class UDPReceiver

java.lang.Object
  extended by org.apache.log4j.spi.ComponentBase
      extended by org.apache.log4j.plugins.PluginSkeleton
          extended by org.apache.log4j.plugins.Receiver
              extended by org.apache.log4j.net.UDPReceiver
All Implemented Interfaces:
org.apache.log4j.net.NetworkBased, org.apache.log4j.net.PortBased, org.apache.log4j.plugins.Pauseable, org.apache.log4j.plugins.Plugin, org.apache.log4j.spi.Component, org.apache.log4j.spi.OptionHandler, org.apache.log4j.spi.Thresholdable

public class UDPReceiver
extends Receiver
implements org.apache.log4j.net.PortBased, org.apache.log4j.plugins.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
           
 
Fields inherited from class org.apache.log4j.plugins.Receiver
thresholdLevel
 
Fields inherited from class org.apache.log4j.plugins.PluginSkeleton
active, name
 
Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Constructor Summary
UDPReceiver()
           
 
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()
           
 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()
           
 
Methods inherited from class org.apache.log4j.plugins.Receiver
doPost, getThreshold, isAsSevereAsThreshold, setThreshold
 
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 org.apache.log4j.spi.ComponentBase
getLogger, getNonFloodingLogger, resetErrorCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.log4j.net.NetworkBased
getName, isActive
 

Field Detail

paused

protected boolean paused
Constructor Detail

UDPReceiver

public UDPReceiver()
Method Detail

getPort

public int getPort()
Specified by:
getPort in interface org.apache.log4j.net.PortBased

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 org.apache.log4j.plugins.Pauseable

setPaused

public void setPaused(boolean b)
Specified by:
setPaused in interface org.apache.log4j.plugins.Pauseable

shutdown

public void shutdown()
Specified by:
shutdown in interface org.apache.log4j.plugins.Plugin

activateOptions

public void activateOptions()
Returns true if this receiver is active.

Specified by:
activateOptions in interface org.apache.log4j.spi.OptionHandler

Log4j 2.0alpha-1

Copyright 2000-2003 Apache Software Foundation.