Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » region » [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;
   18   
   19   import java.io.IOException;
   20   
   21   import org.apache.activemq.command.ConsumerId;
   22   import org.apache.activemq.command.Message;
   23   import org.apache.activemq.command.MessageId;
   24   
   25   /**
   26    * Keeps track of a message that is flowing through the Broker.  This 
   27    * object may hold a hard reference to the message or only hold the
   28    * id of the message if the message has been persisted on in a MessageStore.
   29    * 
   30    * @version $Revision: 1.15 $
   31    */
   32   public interface MessageReference {
   33       
   34       MessageId getMessageId();
   35       Message getMessageHardRef();
   36       Message getMessage() throws IOException;
   37       boolean isPersistent();
   38       
   39       Destination getRegionDestination();
   40       
   41       int getRedeliveryCounter();
   42       void incrementRedeliveryCounter();
   43       
   44       int getReferenceCount();
   45       
   46       int incrementReferenceCount();
   47       int decrementReferenceCount();
   48       ConsumerId getTargetConsumerId();
   49       int getSize();
   50       long getExpiration();
   51       String getGroupID();
   52       int getGroupSequence();
   53       
   54       /**
   55        * Returns true if this message is expired
   56        */
   57       boolean isExpired();
   58   
   59       /**
   60        * Returns true if this message is dropped.
   61        */
   62       boolean isDropped();
   63       
   64       /**
   65        * @return true if the message is an advisory
   66        */
   67       boolean isAdvisory();
   68       
   69   }

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