Log4j 1.3alpha-8

org.apache.log4j.net
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, Component, NetworkBased, OptionHandler, Pauseable, Plugin, PortBased, Thresholdable

public class MulticastReceiver
extends Receiver
implements PortBased, AddressBased, Pauseable

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

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
MulticastReceiver()
           
 
Method Summary
 void activateOptions()
          Activate the options that were previously set with calls to option setters.
 String getAddress()
          Returns a String representation of the Address this instance encompasses
 String getDecoder()
           
 String getEncoding()
          Returns value of the Encoding option.
 int getPort()
          Returns the Port # that this net based thing is using
 boolean isActive()
          Returns true if this receiver is active.
 boolean isPaused()
           
 void setAddress(String address)
           
 void setDecoder(String decoder)
           
 void setEncoding(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.Receiver
doPost, getThreshold, isAsSevereAsThreshold, setThreshold
 
Methods inherited from class org.apache.log4j.plugins.PluginSkeleton
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, 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
 

Constructor Detail

MulticastReceiver

public MulticastReceiver()
Method Detail

getDecoder

public String getDecoder()

setDecoder

public void setDecoder(String decoder)

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
Following copied from interface: org.apache.log4j.net.PortBased
Returns:
int port number

setPort

public void setPort(int port)

getAddress

public String getAddress()
Description copied from interface: AddressBased
Returns a String representation of the Address this instance encompasses
Specified by:
getAddress in interface AddressBased
Following copied from interface: org.apache.log4j.net.AddressBased
Returns:
String representation of the Address

setEncoding

public void setEncoding(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 String getEncoding()
Returns value of the Encoding option.

shutdown

public void shutdown()
Description copied from interface: Plugin
Call when the plugin should be stopped.

setAddress

public void setAddress(String address)

isPaused

public boolean isPaused()
Specified by:
isPaused in interface Pauseable

setPaused

public void setPaused(boolean b)
Specified by:
setPaused in interface Pauseable

isActive

public boolean isActive()
Returns true if this receiver is active.
Specified by:
isActive in interface NetworkBased
Overrides:
isActive in class PluginSkeleton
Following copied from class: org.apache.log4j.plugins.PluginSkeleton
Returns:
true/false

activateOptions

public void activateOptions()
Description copied from interface: OptionHandler
Activate the options that were previously set with calls to option setters.

This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.


Log4j 1.3alpha-8

Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.