org.apache.logging.log4j.core.net
Class AbstractJMSReceiver
java.lang.Object
org.apache.logging.log4j.core.AbstractServer
org.apache.logging.log4j.core.net.AbstractJMSReceiver
- All Implemented Interfaces:
- javax.jms.MessageListener
- Direct Known Subclasses:
- JMSQueueReceiver, JMSTopicReceiver
public abstract class AbstractJMSReceiver
- extends AbstractServer
- implements javax.jms.MessageListener
Abstract base class for receiving LogEvents over JMS. This class expects all messages to be serialized log events.
Field Summary |
protected Logger |
logger
Logger to capture diagnostics. |
Method Summary |
protected Object |
lookup(Context ctx,
String name)
Looks up an object from the Context. |
void |
onMessage(javax.jms.Message message)
Listener that receives the event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected Logger logger
- Logger to capture diagnostics.
AbstractJMSReceiver
public AbstractJMSReceiver()
onMessage
public void onMessage(javax.jms.Message message)
- Listener that receives the event.
- Specified by:
onMessage
in interface javax.jms.MessageListener
- Parameters:
message
- The received message.
lookup
protected Object lookup(Context ctx,
String name)
throws NamingException
- Looks up an object from the Context.
- Parameters:
ctx
- The Context.name
- The name of the object to locate.
- Returns:
- The object.
- Throws:
NamingException
- if an error occurs.
Copyright © 1999-2013 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.