org.apache.activemq.broker.region.policy
Interface SubscriptionRecoveryPolicy

All Superinterfaces:
Service
All Known Implementing Classes:
FixedCountSubscriptionRecoveryPolicy, FixedSizedSubscriptionRecoveryPolicy, LastImageSubscriptionRecoveryPolicy, NoSubscriptionRecoveryPolicy, QueryBasedSubscriptionRecoveryPolicy, TimedSubscriptionRecoveryPolicy

public interface SubscriptionRecoveryPolicy
extends Service

Abstraction to allow different recovery policies to be plugged into the region implementations. This is used by a topic to retroactively recover messages that the subscription missed.

Version:
$Revision$

Method Summary
 boolean add(ConnectionContext context, MessageReference message)
          A message was sent to the destination.
 Message[] browse(ActiveMQDestination dest)
           
 SubscriptionRecoveryPolicy copy()
          Used to copy the policy object.
 void recover(ConnectionContext context, Topic topic, Subscription sub)
          Let a subscription recover message held by the policy.
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

add

boolean add(ConnectionContext context,
            MessageReference message)
            throws java.lang.Exception
A message was sent to the destination.

Parameters:
context -
message -
node -
Returns:
true if successful
Throws:
java.lang.Exception

recover

void recover(ConnectionContext context,
             Topic topic,
             Subscription sub)
             throws java.lang.Exception
Let a subscription recover message held by the policy.

Parameters:
context -
topic -
sub -
node -
Throws:
java.lang.Exception

browse

Message[] browse(ActiveMQDestination dest)
                 throws java.lang.Exception
Parameters:
dest -
Returns:
messages
Throws:
java.lang.Exception

copy

SubscriptionRecoveryPolicy copy()
Used to copy the policy object.



Copyright © 2009 Apache Software Foundation. All Rights Reserved.