|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler
public abstract class AbstractDLQHandler
An abstract DLQ handler.
Field Summary | |
---|---|
protected JmsActivation |
activation
The activation |
protected javax.jms.QueueConnection |
connection
The DLQ Connection |
protected javax.jms.Queue |
dlq
The DLQ |
protected static org.jboss.logging.Logger |
log
The logger |
Fields inherited from interface org.jboss.resource.adapter.jms.inflow.DLQHandler |
---|
JBOSS_ORIG_DESTINATION, JBOSS_ORIG_MESSAGEID, PROPERTY_DELIVERY_COUNT |
Constructor Summary | |
---|---|
AbstractDLQHandler()
|
Method Summary | |
---|---|
protected void |
doSend(javax.jms.Message msg,
int deliveryMode,
int priority,
long timeToLive)
Do the message send |
protected int |
getDeliveryMode(javax.jms.Message msg)
Get the delivery mode for the DLQ message |
protected int |
getPriority(javax.jms.Message msg)
Get the priority for the DLQ message |
protected long |
getTimeToLive(javax.jms.Message msg)
Get the time to live for the DLQ message |
protected abstract boolean |
handleDelivery(javax.jms.Message msg)
Do we handle the message? |
boolean |
handleRedeliveredMessage(javax.jms.Message msg)
Check whether the DLQ should handle the message |
protected void |
handleSendError(javax.jms.Message msg,
Throwable t)
Handle a failure to send the message to the dlq |
protected javax.jms.Message |
makeWritable(javax.jms.Message msg)
Make a writable copy of the message |
void |
messageDelivered(javax.jms.Message msg)
Notification that the message was delivered |
void |
onException(javax.jms.JMSException exception)
|
protected void |
sendToDLQ(javax.jms.Message msg)
Send the message to the dlq |
void |
setup(JmsActivation activation,
Context ctx)
Set up the DLQ |
protected void |
setupDLQConnection(Context ctx)
Setup the DLQ Connection |
protected void |
setupDLQDestination(Context ctx)
Setup the DLQ Destination |
void |
teardown()
Tear down the DLQ |
protected void |
teardownDLQConnection()
Teardown the DLQ Connection |
protected void |
teardownDLQDestination()
Teardown the DLQ Destination |
protected void |
warnDLQ(javax.jms.Message msg,
int count,
int max)
Warn that a message is being handled by the DLQ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.jboss.logging.Logger log
protected JmsActivation activation
protected javax.jms.Queue dlq
protected javax.jms.QueueConnection connection
Constructor Detail |
---|
public AbstractDLQHandler()
Method Detail |
---|
public boolean handleRedeliveredMessage(javax.jms.Message msg)
DLQHandler
handleRedeliveredMessage
in interface DLQHandler
msg
- the message about to be delivered
public void messageDelivered(javax.jms.Message msg)
DLQHandler
messageDelivered
in interface DLQHandler
msg
- the message that was deliveredpublic void setup(JmsActivation activation, Context ctx) throws Exception
DLQHandler
setup
in interface DLQHandler
activation
- the activationctx
- the naming context
Exception
- for any errorpublic void teardown()
DLQHandler
teardown
in interface DLQHandler
public void onException(javax.jms.JMSException exception)
onException
in interface javax.jms.ExceptionListener
protected void setupDLQDestination(Context ctx) throws Exception
ctx
- the naming context
Exception
- for any errorprotected void teardownDLQDestination()
protected void setupDLQConnection(Context ctx) throws Exception
ctx
- the naming context
Exception
- for any errorprotected void teardownDLQConnection()
protected abstract boolean handleDelivery(javax.jms.Message msg)
msg
- the message to handle
protected void warnDLQ(javax.jms.Message msg, int count, int max)
msg
- count
- the number of redeliversmax
- the maximum number of redeliveriesprotected void sendToDLQ(javax.jms.Message msg)
msg
- message to sendprotected int getDeliveryMode(javax.jms.Message msg)
msg
- the message
protected int getPriority(javax.jms.Message msg)
msg
- the message
protected long getTimeToLive(javax.jms.Message msg)
msg
- the message
protected javax.jms.Message makeWritable(javax.jms.Message msg)
msg
- the message
protected void doSend(javax.jms.Message msg, int deliveryMode, int priority, long timeToLive)
msg
- the messageprotected void handleSendError(javax.jms.Message msg, Throwable t)
msg
- the messaget
- the error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |