Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » region » policy » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.activemq.broker.region.policy;
   18   
   19   import org.apache.activemq.command.ActiveMQDestination;
   20   import org.apache.activemq.command.Message;
   21   
   22   /**
   23    * A strategy for choosing which destination is used for dead letter queue messages.
   24    * 
   25    * @version $Revision: 668146 $
   26    */
   27   public interface DeadLetterStrategy {
   28       
   29       /**
   30        * Allow pluggable strategy for deciding if message should be sent to a dead letter queue
   31        * for example, you might not want to ignore expired or non-persistent messages
   32        * @param message
   33        * @return true if message should be sent to a dead letter queue
   34        */
   35       boolean isSendToDeadLetterQueue(Message message);
   36   
   37       /**
   38        * Returns the dead letter queue for the given destination.
   39        */
   40       ActiveMQDestination getDeadLetterQueueFor(ActiveMQDestination originalDestination);
   41       
   42       /**
   43        * @return true if processes expired messages
   44        */
   45       public boolean isProcessExpired() ;
   46   
   47       /**
   48        * @param processExpired the processExpired to set
   49        */
   50       public void setProcessExpired(boolean processExpired);
   51   
   52       /**
   53        * @return the processNonPersistent
   54        */
   55       public boolean isProcessNonPersistent();
   56   
   57       /**
   58        * @param processNonPersistent the processNonPersistent to set
   59        */
   60       public void setProcessNonPersistent(boolean processNonPersistent);
   61   
   62   }

Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » region » policy » [javadoc | source]