ibspan.log4jade.client
Class ACLAppender

java.lang.Object
  extended by org.apache.log4j.spi.ComponentBase
      extended by org.apache.log4j.AppenderSkeleton
          extended by ibspan.log4jade.client.ACLAppender
All Implemented Interfaces:
Serializable, Appender, Component, OptionHandler

public class ACLAppender
extends AppenderSkeleton
implements Serializable

ACLAppender is responsible for

Author:
Maciej Gawinecki Contributors:
  • Ruth Zamorano
  • Rafael Luque
  • Jaran Nilsen
  • Caire Giovanni
See Also:
Serialized Form

Field Summary
protected  AgentEventsBuffer buffer
           
protected  TriggeringEventEvaluator evaluator
           
protected  Agent owner
           
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
active, closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Constructor Summary
ACLAppender(Agent a, AgentContext context, int bufferSize)
           
ACLAppender(Agent a, TriggeringEventEvaluator evaluator, AgentContext context, int bufferSize)
           
 
Method Summary
protected  void append(LoggingEvent event)
           
 void close()
          Close this appender.
 void forceSending()
           
 AgentEventsBuffer getBuffer()
           
 int getBufferSize()
           
 AgentContext getContext()
           
 String getEvaluatorClass()
           
 boolean getLocationInfo()
          Returns value of the LocationInfo option.
 boolean requiresLayout()
           
protected  void sendBuffer()
          Sends buffer with logging events to Logging Service agents.
 void setBufferSize(int bufferSize)
           
 void setContext(AgentContext context)
           
 void setEvaluatorClass(String value)
          The EvaluatorClass option takes a string value representing the name of the class implementing the TriggeringEventEvaluator interface.
 void setLocationInfo(boolean locationInfo)
          The LocationInfo option takes a boolean value.
protected  void subscribe()
          Subscribe for logging service.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isActive, isAsSevereAsThreshold, isAsSevereAsThreshold, isClosed, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class org.apache.log4j.spi.ComponentBase
getLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepository
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.log4j.spi.Component
setLoggerRepository
 

Field Detail

owner

protected Agent owner

buffer

protected AgentEventsBuffer buffer

evaluator

protected TriggeringEventEvaluator evaluator
Constructor Detail

ACLAppender

public ACLAppender(Agent a,
                   AgentContext context,
                   int bufferSize)
Parameters:
a -

ACLAppender

public ACLAppender(Agent a,
                   TriggeringEventEvaluator evaluator,
                   AgentContext context,
                   int bufferSize)
Parameters:
a -
evaluator -
diagnosticContext -
Method Detail

setLocationInfo

public void setLocationInfo(boolean locationInfo)
The LocationInfo option takes a boolean value. If true, the information sent to the remote host will include location information. By default no location information is sent to the server.


getLocationInfo

public boolean getLocationInfo()
Returns value of the LocationInfo option.


getContext

public AgentContext getContext()

setContext

public void setContext(AgentContext context)

getBufferSize

public int getBufferSize()
Returns:

setBufferSize

public void setBufferSize(int bufferSize)
Parameters:
bufferSize -

setEvaluatorClass

public void setEvaluatorClass(String value)
The EvaluatorClass option takes a string value representing the name of the class implementing the TriggeringEventEvaluator interface. A corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender.


getEvaluatorClass

public String getEvaluatorClass()
Returns:

append

protected void append(LoggingEvent event)
Specified by:
append in class AppenderSkeleton

sendBuffer

protected void sendBuffer()
Sends buffer with logging events to Logging Service agents. Messages contains logging events and diagnostic context of the owner agent.


requiresLayout

public boolean requiresLayout()
Specified by:
requiresLayout in interface Appender
Specified by:
requiresLayout in class AppenderSkeleton

close

public void close()
Close this appender. If events buffer is not empty, then it is send before closing.

Specified by:
close in interface Appender
Specified by:
close in class AppenderSkeleton

subscribe

protected void subscribe()
Subscribe for logging service. Updates list of Logging Service agents (receivers of logging events).


getBuffer

public AgentEventsBuffer getBuffer()

forceSending

public void forceSending()