org.objectweb.dream.queue
Class BasicPushPullKeyQueueImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.queue.AbstractPushQueueImpl
org.objectweb.dream.queue.BasicPushPullKeyQueueImpl
- All Implemented Interfaces:
- AttributeController, BindingController, LifeCycleController, Loggable, Pull, Push, PushPullKeyQueueAttributeController, PushQueueAttributeController, QueueAttributeController
- public class BasicPushPullKeyQueueImpl
- extends AbstractPushQueueImpl
- implements Pull, PushPullKeyQueueAttributeController
Queue implementation delivering message using a key. Messages are stored in a
hashtable. The key corresponding to a message is obtained by calling the
getKey
method on the Chunk whose name is specified as an
initialization parameter.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_CONTEXT
public static final String KEY_CONTEXT
- The object used to retreive the key in the context map of the
Pull.pull(java.util.Map)
method.
- See Also:
- Constant Field Values
BasicPushPullKeyQueueImpl
public BasicPushPullKeyQueueImpl()
push
public void push(Message message,
Map context)
throws PushException
- Specified by:
push
in interface Push
- Overrides:
push
in class AbstractPushQueueImpl
- Throws:
PushException
- See Also:
Push.push(org.objectweb.dream.message.Message,
java.util.Map)
pull
public Message pull(Map context)
throws PullException
- Specified by:
pull
in interface Pull
- Throws:
PullException
- See Also:
Pull.pull(java.util.Map)
handlePolicy
protected Message handlePolicy(Object key)
throws KeyNotFoundException
- Handle "meesage not found" policy, returns
null
or throw a
KeyNotFoundException
.
- Parameters:
key
- the not found key
- Returns:
null
- Throws:
KeyNotFoundException
- if policy is
PushPullKeyQueueAttributeController.EXCEPTION_MESSAGE_NOT_FOUND_POLICY
.
getMessageNotFoundPolicy
public String getMessageNotFoundPolicy()
- Description copied from interface:
PushPullKeyQueueAttributeController
- Returns the policy applied when a message cannot be found.
- Specified by:
getMessageNotFoundPolicy
in interface PushPullKeyQueueAttributeController
- Returns:
- the policy applied when a message cannot be found.
- See Also:
PushPullKeyQueueAttributeController.getMessageNotFoundPolicy()
setMessageNotFoundPolicy
public void setMessageNotFoundPolicy(String policy)
- Description copied from interface:
PushPullKeyQueueAttributeController
- Sets the policy applied when a message cannot be found.
- Specified by:
setMessageNotFoundPolicy
in interface PushPullKeyQueueAttributeController
- Parameters:
policy
- the policy applied when a message cannot be found.- See Also:
PushPullKeyQueueAttributeController.setMessageNotFoundPolicy(java.lang.String)
getKeyName
public String getKeyName()
- Description copied from interface:
PushPullKeyQueueAttributeController
- Returns the name to which the key is mapped in the Pull context.
- Specified by:
getKeyName
in interface PushPullKeyQueueAttributeController
- Returns:
- the name to which the key is mapped in the Pull context.
- See Also:
PushPullKeyQueueAttributeController.getKeyName()
setKeyName
public void setKeyName(String name)
- Description copied from interface:
PushPullKeyQueueAttributeController
- Sets the name to which the key is mapped in the Pull context.
- Specified by:
setKeyName
in interface PushPullKeyQueueAttributeController
- Parameters:
name
- the name to which the key is mapped in the Pull context.- See Also:
PushPullKeyQueueAttributeController.setKeyName(java.lang.String)
listFc
public String[] listFc()
- Specified by:
listFc
in interface BindingController
- See Also:
BindingController.listFc()
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.