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.AbstractAppender
An abstract base class for implementation inheritence for a log4j JMS appender
-
-
Constructor Summary
Constructors Modifier Constructor Description JmsLogAppenderSupport()
protected
JmsLogAppenderSupport(String name, org.apache.logging.log4j.core.Filter filter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
activateOptions()
void
append(org.apache.logging.log4j.core.LogEvent event)
void
close()
protected abstract Connection
createConnection()
protected Message
createMessage(org.apache.logging.log4j.core.LogEvent event)
protected MessageProducer
createProducer()
protected Session
createSession()
Connection
getConnection()
protected Destination
getDestination(org.apache.logging.log4j.core.LogEvent 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.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:
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()
-
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
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:
JMSException
NamingException
-
getDestination
protected Destination getDestination(org.apache.logging.log4j.core.LogEvent event) throws JMSException, NamingException
- Throws:
JMSException
NamingException
-
-