org.codehaus.activemq.service
Class DeadLetterPolicy

java.lang.Object
  extended byorg.codehaus.activemq.service.DeadLetterPolicy

public class DeadLetterPolicy
extends Object

Determines how messages are stored in a dead letter queue

Version:
$Revision: 1.2 $

Field Summary
static String DEAD_LETTER_PREFIX
          Prefix used by dead letter queues
 
Constructor Summary
DeadLetterPolicy()
          Default constructor
DeadLetterPolicy(Broker broker)
          Construct a dead letter policy
 
Method Summary
 Broker getBroker()
           
 String getDeadLetterName()
           
 String getDeadLetterNameFromDestination(ActiveMQDestination destination)
          Get the name of the DLQ from the destination provided
 String getDeadLetterPrefix()
           
 boolean isDeadLetterEnabled()
           
 boolean isDeadLetterPerDestinationName()
           
 boolean isNoTopicConsumerEnabled()
           
 boolean isStoreNonPersistentMessages()
           
 void sendToDeadLetter(ActiveMQMessage message)
          Send a message to a dead letter queue
 void setBroker(Broker broker)
           
 void setDeadLetterEnabled(boolean deadLetterEnabled)
           
 void setDeadLetterName(String deadLetterName)
           
 void setDeadLetterPerDestinationName(boolean deadLetterPerDestinationName)
           
 void setDeadLetterPrefix(String deadLetterPrefix)
           
 void setNoTopicConsumerEnabled(boolean noTopicConsumerEnabled)
           
 void setStoreNonPersistentMessages(boolean storeNonPersistentMessages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEAD_LETTER_PREFIX

public static final String DEAD_LETTER_PREFIX
Prefix used by dead letter queues

See Also:
Constant Field Values
Constructor Detail

DeadLetterPolicy

public DeadLetterPolicy(Broker broker)
Construct a dead letter policy

Parameters:
broker -

DeadLetterPolicy

public DeadLetterPolicy()
Default constructor

Method Detail

getBroker

public Broker getBroker()
Returns:
Returns the broker.

setBroker

public void setBroker(Broker broker)
Parameters:
broker - The broker to set.

isDeadLetterEnabled

public boolean isDeadLetterEnabled()
Returns:
Returns the deadLetterEnabled.

setDeadLetterEnabled

public void setDeadLetterEnabled(boolean deadLetterEnabled)
Parameters:
deadLetterEnabled - The deadLetterEnabled to set.

isDeadLetterPerDestinationName

public boolean isDeadLetterPerDestinationName()
Returns:
Returns the deadLetterPerDestinationName.

setDeadLetterPerDestinationName

public void setDeadLetterPerDestinationName(boolean deadLetterPerDestinationName)
Parameters:
deadLetterPerDestinationName - The deadLetterPerDestinationName to set.

getDeadLetterName

public String getDeadLetterName()
Returns:
Returns the deadLetterName.

setDeadLetterName

public void setDeadLetterName(String deadLetterName)
Parameters:
deadLetterName - The deadLetterName to set.

getDeadLetterPrefix

public String getDeadLetterPrefix()
Returns:
Returns the deadLetterPrefix.

setDeadLetterPrefix

public void setDeadLetterPrefix(String deadLetterPrefix)
Parameters:
deadLetterPrefix - The deadLetterPrefix to set.

isStoreNonPersistentMessages

public boolean isStoreNonPersistentMessages()
Returns:
Returns the storeNonPersistentMessages.

setStoreNonPersistentMessages

public void setStoreNonPersistentMessages(boolean storeNonPersistentMessages)
Parameters:
storeNonPersistentMessages - The storeNonPersistentMessages to set.

isNoTopicConsumerEnabled

public boolean isNoTopicConsumerEnabled()
Returns:
Returns the noTopicConsumerEnabled.

setNoTopicConsumerEnabled

public void setNoTopicConsumerEnabled(boolean noTopicConsumerEnabled)
Parameters:
noTopicConsumerEnabled - The noTopicConsumerEnabled to set.

getDeadLetterNameFromDestination

public String getDeadLetterNameFromDestination(ActiveMQDestination destination)
Get the name of the DLQ from the destination provided

Parameters:
destination -
Returns:
the name of the DLQ for this Destination

sendToDeadLetter

public void sendToDeadLetter(ActiveMQMessage message)
                      throws JMSException
Send a message to a dead letter queue

Parameters:
message -
Throws:
JMSException


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.