Class AbstractMessageHandler
- java.lang.Object
-
- net.timewalker.ffmq4.common.session.AbstractMessageHandler
-
- Direct Known Subclasses:
AbstractMessageConsumer,AbstractMessageProducer
public abstract class AbstractMessageHandler extends Object
Base implementation for a message handler (ie. MessageConsumer or MessageProducer)
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanclosedprotected AbstractConnectionconnectionprotected javax.jms.Destinationdestinationprotected ReadWriteLockexternalAccessLockprotected IntegerIDidprotected AbstractSessionsession
-
Constructor Summary
Constructors Constructor Description AbstractMessageHandler(AbstractSession session, javax.jms.Destination destination, IntegerID handlerId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckNotClosed()Check that the session is not closedvoidgetEntitiesDescription(StringBuilder sb)Get a description of entities held by this objectIntegerIDgetId()Get the message handler unique IDAbstractSessiongetSession()Get the parent sessionStringtoString()
-
-
-
Field Detail
-
id
protected IntegerID id
-
connection
protected AbstractConnection connection
-
session
protected AbstractSession session
-
destination
protected javax.jms.Destination destination
-
closed
protected boolean closed
-
externalAccessLock
protected ReadWriteLock externalAccessLock
-
-
Constructor Detail
-
AbstractMessageHandler
public AbstractMessageHandler(AbstractSession session, javax.jms.Destination destination, IntegerID handlerId)
Constructor
-
-
Method Detail
-
getId
public final IntegerID getId()
Get the message handler unique ID
-
getSession
public final AbstractSession getSession()
Get the parent session
-
checkNotClosed
protected final void checkNotClosed() throws javax.jms.JMSExceptionCheck that the session is not closed- Throws:
javax.jms.JMSException
-
getEntitiesDescription
public final void getEntitiesDescription(StringBuilder sb)
Get a description of entities held by this object
-
-