org.objectweb.dream.queue
Interface PushPullKeyQueueAttributeController

All Superinterfaces:
AttributeController
All Known Implementing Classes:
BasicPushPullKeyQueueImpl

public interface PushPullKeyQueueAttributeController
extends AttributeController

Key based Push/Pull queue attribute controller. It defines a policy applied when the requested message cannot be found. Two default policies are provided (specific implementations can define other).


Field Summary
static String EXCEPTION_MESSAGE_NOT_FOUND_POLICY
          "Message not found" policy that throw a KeyNotFoundException exception.
static String RETURN_NULL_MESSAGE_NOT_FOUND_POLICY
          "Message not found" policy that returns null as result of the pull method.
 
Method Summary
 String getKeyName()
          Returns the name to which the key is mapped in the Pull context.
 String getMessageNotFoundPolicy()
          Returns the policy applied when a message cannot be found.
 void setKeyName(String name)
          Sets the name to which the key is mapped in the Pull context.
 void setMessageNotFoundPolicy(String policy)
          Sets the policy applied when a message cannot be found.
 

Field Detail

RETURN_NULL_MESSAGE_NOT_FOUND_POLICY

public static final String RETURN_NULL_MESSAGE_NOT_FOUND_POLICY
"Message not found" policy that returns null as result of the pull method.

See Also:
Constant Field Values

EXCEPTION_MESSAGE_NOT_FOUND_POLICY

public static final String EXCEPTION_MESSAGE_NOT_FOUND_POLICY
"Message not found" policy that throw a KeyNotFoundException exception.

See Also:
Constant Field Values
Method Detail

getMessageNotFoundPolicy

public String getMessageNotFoundPolicy()
Returns the policy applied when a message cannot be found.

Returns:
the policy applied when a message cannot be found.

setMessageNotFoundPolicy

public void setMessageNotFoundPolicy(String policy)
Sets the policy applied when a message cannot be found.

Parameters:
policy - the policy applied when a message cannot be found.

getKeyName

public String getKeyName()
Returns the name to which the key is mapped in the Pull context.

Returns:
the name to which the key is mapped in the Pull context.

setKeyName

public void setKeyName(String name)
Sets the name to which the key is mapped in the Pull context.

Parameters:
name - the name to which the key is mapped in the Pull context.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.