Package org.apache.activemq.util
Class JmsLogAppenderSupport
- java.lang.Object
-
- org.apache.logging.log4j.core.AbstractLifeCycle
-
- org.apache.logging.log4j.core.filter.AbstractFilterable
-
- org.apache.logging.log4j.core.appender.AbstractAppender
-
- org.apache.activemq.util.JmsLogAppenderSupport
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.Appender,org.apache.logging.log4j.core.filter.Filterable,org.apache.logging.log4j.core.impl.LocationAware,org.apache.logging.log4j.core.LifeCycle,org.apache.logging.log4j.core.LifeCycle2
- Direct Known Subclasses:
JmsLogAppender,JndiJmsLogAppender
public abstract class JmsLogAppenderSupport extends org.apache.logging.log4j.core.appender.AbstractAppenderAn abstract base class for implementation inheritence for a log4j JMS appender
-
-
Constructor Summary
Constructors Modifier Constructor Description JmsLogAppenderSupport()protectedJmsLogAppenderSupport(String name, org.apache.logging.log4j.core.Filter filter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactivateOptions()voidappend(org.apache.logging.log4j.core.LogEvent event)voidclose()protected abstract ConnectioncreateConnection()protected MessagecreateMessage(org.apache.logging.log4j.core.LogEvent event)protected MessageProducercreateProducer()protected SessioncreateSession()ConnectiongetConnection()protected DestinationgetDestination(org.apache.logging.log4j.core.LogEvent event)MessageProducergetProducer()SessiongetSession()booleanrequiresLayout()voidsetConnection(Connection connection)voidsetProducer(MessageProducer producer)voidsetSession(Session session)-
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toString
-
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stop, stop
-
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
-
-
-
-
Constructor Detail
-
JmsLogAppenderSupport
public JmsLogAppenderSupport()
-
JmsLogAppenderSupport
protected JmsLogAppenderSupport(String name, org.apache.logging.log4j.core.Filter filter)
-
-
Method Detail
-
getConnection
public Connection getConnection() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
setConnection
public void setConnection(Connection connection)
-
getSession
public Session getSession() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
setSession
public void setSession(Session session)
-
getProducer
public MessageProducer getProducer() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
setProducer
public void setProducer(MessageProducer producer)
-
close
public void close()
-
requiresLayout
public boolean requiresLayout()
-
activateOptions
public void activateOptions()
-
createConnection
protected abstract Connection createConnection() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
createSession
protected Session createSession() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
createProducer
protected MessageProducer createProducer() throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
append
public void append(org.apache.logging.log4j.core.LogEvent event)
-
createMessage
protected Message createMessage(org.apache.logging.log4j.core.LogEvent event) throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
getDestination
protected Destination getDestination(org.apache.logging.log4j.core.LogEvent event) throws JMSException, NamingException
- Throws:
JMSExceptionNamingException
-
-