|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.appender.AbstractManager
org.apache.logging.log4j.core.appender.mom.JmsManager
public class JmsManager
JMS connection and session manager. Can be used to access MessageProducer, MessageConsumer, and Message objects involving a configured ConnectionFactory and Destination.
Field Summary |
---|
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager |
---|
count |
Method Summary | |
---|---|
Message |
createMessage(Serializable object)
Creates a TextMessage or ObjectMessage from a Serializable object. |
MessageConsumer |
createMessageConsumer()
Creates a MessageConsumer on this Destination using the current Session. |
MessageProducer |
createMessageProducer()
Creates a MessageProducer on this Destination using the current Session. |
static JmsManager |
getJmsManager(String name,
JndiManager jndiManager,
String connectionFactoryName,
String destinationName,
String username,
String password)
Gets a JmsManager using the specified configuration parameters. |
protected void |
releaseSub()
May be overridden by Managers to perform processing while the Manager is being released and the lock is held. |
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager |
---|
getContentFormat, getCount, getManager, getName, hasManager, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JmsManager getJmsManager(String name, JndiManager jndiManager, String connectionFactoryName, String destinationName, String username, String password)
name
- The name to use for this JmsManager.jndiManager
- The JndiManager to look up JMS information through.connectionFactoryName
- The binding name for the ConnectionFactory
.destinationName
- The binding name for the Destination
.username
- The username to connect with or null
for no authentication.password
- The password to use with the given username or null
for no authentication.
public MessageConsumer createMessageConsumer() throws JMSException
JMSException
public MessageProducer createMessageProducer() throws JMSException
JMSException
public Message createMessage(Serializable object) throws JMSException
Layout
such as PatternLayout
,
the LogEvent
message will be serialized to a String. When using a
layout such as SerializedLayout
, the LogEvent message will be
serialized as a Java object.
object
- The LogEvent or String message to wrap.
JMSException
protected void releaseSub()
AbstractManager
releaseSub
in class AbstractManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.