Class Consumer
- java.lang.Object
-
- com.swiftmq.impl.jms.standard.v400.Consumer
-
- All Implemented Interfaces:
TransactionFactory
- Direct Known Subclasses:
QueueConsumer
,TopicConsumer
,TopicDurableConsumer
public class Consumer extends java.lang.Object implements TransactionFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected int
clientDispatchId
protected int
clientListenerId
protected SessionContext
ctx
protected boolean
hasListener
protected boolean
markedForClose
protected MessageProcessor
messageProcessor
protected QueuePullTransaction
readTransaction
protected QueueReceiver
receiver
protected Selector
selector
protected QueuePullTransaction
transaction
-
Constructor Summary
Constructors Modifier Constructor Description protected
Consumer(SessionContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
QueueTransaction
createReadTransaction()
QueueTransaction
createTransaction()
int
getClientDispatchId()
int
getClientListenerId()
MessageProcessor
getMessageProcessor()
QueuePullTransaction
getReadTransaction()
Selector
getSelector()
QueuePullTransaction
getTransaction()
boolean
hasListener()
protected boolean
isAutoCommit()
boolean
isMarkedForClose()
void
markForClose()
void
removeMessageListener()
void
setMessageListener(int clientDispatchId, int clientListenerId, MessageProcessor messageProcessor)
protected void
setQueueReceiver(QueueReceiver receiver)
protected void
setSelector(Selector selector)
-
-
-
Field Detail
-
ctx
protected SessionContext ctx
-
receiver
protected QueueReceiver receiver
-
selector
protected Selector selector
-
readTransaction
protected QueuePullTransaction readTransaction
-
transaction
protected QueuePullTransaction transaction
-
clientDispatchId
protected int clientDispatchId
-
clientListenerId
protected int clientListenerId
-
messageProcessor
protected MessageProcessor messageProcessor
-
hasListener
protected boolean hasListener
-
markedForClose
protected boolean markedForClose
-
-
Constructor Detail
-
Consumer
protected Consumer(SessionContext ctx)
-
-
Method Detail
-
isAutoCommit
protected boolean isAutoCommit()
-
setQueueReceiver
protected void setQueueReceiver(QueueReceiver receiver)
-
setSelector
protected void setSelector(Selector selector)
-
getSelector
public Selector getSelector()
-
createTransaction
public QueueTransaction createTransaction() throws java.lang.Exception
- Specified by:
createTransaction
in interfaceTransactionFactory
- Throws:
java.lang.Exception
-
createReadTransaction
public QueueTransaction createReadTransaction() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTransaction
public QueuePullTransaction getTransaction()
-
getReadTransaction
public QueuePullTransaction getReadTransaction()
-
setMessageListener
public void setMessageListener(int clientDispatchId, int clientListenerId, MessageProcessor messageProcessor)
-
getClientDispatchId
public int getClientDispatchId()
-
getClientListenerId
public int getClientListenerId()
-
getMessageProcessor
public MessageProcessor getMessageProcessor()
-
removeMessageListener
public void removeMessageListener()
-
hasListener
public boolean hasListener()
-
markForClose
public void markForClose()
- Specified by:
markForClose
in interfaceTransactionFactory
-
isMarkedForClose
public boolean isMarkedForClose()
- Specified by:
isMarkedForClose
in interfaceTransactionFactory
-
close
protected void close() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-