org.apache.logging.log4j.core.net.jms
Class AbstractJmsReceiver
java.lang.Object
org.apache.logging.log4j.core.LogEventListener
org.apache.logging.log4j.core.net.jms.AbstractJmsReceiver
- All Implemented Interfaces:
- EventListener, MessageListener
- Direct Known Subclasses:
- JmsQueueReceiver, JmsTopicReceiver
public abstract class AbstractJmsReceiver
- extends LogEventListener
- implements MessageListener
Abstract base class for receiving LogEvents over JMS. This class expects all messages to be serialized log events.
Field Summary |
protected org.apache.logging.log4j.Logger |
logger
Logger to capture diagnostics. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.logging.log4j.Logger logger
- Logger to capture diagnostics.
AbstractJmsReceiver
public AbstractJmsReceiver()
onMessage
public void onMessage(Message message)
- Listener that receives the event.
- Specified by:
onMessage
in interface 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-2014 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.