org.apache.activemq.util
Class JmsLogAppenderSupport

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.activemq.util.JmsLogAppenderSupport
All Implemented Interfaces:
Appender, OptionHandler
Direct Known Subclasses:
JmsLogAppender, JndiJmsLogAppender

public abstract class JmsLogAppenderSupport
extends AppenderSkeleton

An abstract base class for implementation inheritence for a log4j JMS appender


Field Summary
static int JMS_PUBLISH_ERROR_CODE
           
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
JmsLogAppenderSupport()
           
 
Method Summary
 void activateOptions()
           
protected  void append(LoggingEvent event)
           
 void close()
           
protected abstract  Connection createConnection()
           
protected  Message createMessage(LoggingEvent event)
           
protected  MessageProducer createProducer()
           
protected  Session createSession()
           
 Connection getConnection()
           
protected  Destination getDestination(LoggingEvent event)
           
 MessageProducer getProducer()
           
 Session getSession()
           
 boolean requiresLayout()
           
 void setConnection(Connection connection)
           
 void setProducer(MessageProducer producer)
           
 void setSession(Session session)
           
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JMS_PUBLISH_ERROR_CODE

public static final int JMS_PUBLISH_ERROR_CODE
See Also:
Constant Field Values
Constructor Detail

JmsLogAppenderSupport

public JmsLogAppenderSupport()
Method Detail

getConnection

public Connection getConnection()
                         throws JMSException,
                                NamingException
Throws:
JMSException
NamingException

setConnection

public void setConnection(Connection connection)

getSession

public Session getSession()
                   throws JMSException,
                          NamingException
Throws:
JMSException
NamingException

setSession

public void setSession(Session session)

getProducer

public MessageProducer getProducer()
                            throws JMSException,
                                   NamingException
Throws:
JMSException
NamingException

setProducer

public void setProducer(MessageProducer producer)

close

public void close()

requiresLayout

public boolean requiresLayout()

activateOptions

public void activateOptions()
Specified by:
activateOptions in interface OptionHandler
Overrides:
activateOptions in class AppenderSkeleton

createConnection

protected abstract Connection createConnection()
                                        throws JMSException,
                                               NamingException
Throws:
JMSException
NamingException

createSession

protected Session createSession()
                         throws JMSException,
                                NamingException
Throws:
JMSException
NamingException

createProducer

protected MessageProducer createProducer()
                                  throws JMSException,
                                         NamingException
Throws:
JMSException
NamingException

append

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

createMessage

protected Message createMessage(LoggingEvent event)
                         throws JMSException,
                                NamingException
Throws:
JMSException
NamingException

getDestination

protected Destination getDestination(LoggingEvent event)
                              throws JMSException,
                                     NamingException
Throws:
JMSException
NamingException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.