org.codehaus.wadi.core.contextualiser
Class AbstractMotingContextualiser

java.lang.Object
  extended by org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
      extended by org.codehaus.wadi.core.contextualiser.AbstractMotingContextualiser
All Implemented Interfaces:
Contextualiser, Lifecycle
Direct Known Subclasses:
AbstractExclusiveContextualiser, AbstractSharedContextualiser

public abstract class AbstractMotingContextualiser
extends AbstractChainedContextualiser

Abstract base for Contextualisers that are 'chained' - in other words - arranged in a single linked list

Version:
$Revision: 2276 $
Author:
Jules Gosnell

Field Summary
 
Fields inherited from class org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
next
 
Constructor Summary
AbstractMotingContextualiser(Contextualiser next)
           
 
Method Summary
 boolean contextualise(Invocation invocation, java.lang.String key, Immoter immoter, boolean exclusiveOnly)
          Contextualise the given Invocation.
protected abstract  Motable get(java.lang.String id, boolean exclusiveOnly)
           
protected abstract  Emoter getEmoter()
           
protected abstract  Immoter getImmoter()
           
protected  Immoter getPromoter(Immoter immoter)
           
protected  boolean handle(Invocation invocation, java.lang.String id, Immoter immoter, boolean exclusiveOnly)
           
protected  boolean promote(Invocation invocation, java.lang.String id, Immoter immoter, Motable emotable)
           
 
Methods inherited from class org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
doFindRelevantSessionNames, doStart, doStop, findRelevantSessionNames, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.wadi.core.contextualiser.Contextualiser
getDemoter, getSessionNames, getSharedDemoter, promoteToExclusive
 

Constructor Detail

AbstractMotingContextualiser

public AbstractMotingContextualiser(Contextualiser next)
Method Detail

contextualise

public boolean contextualise(Invocation invocation,
                             java.lang.String key,
                             Immoter immoter,
                             boolean exclusiveOnly)
                      throws InvocationException
Description copied from interface: Contextualiser
Contextualise the given Invocation.

Parameters:
invocation - the Invocation
key - the Session key
immoter - an Immoter that can be used to promote the Session when found
exclusiveOnly - whether we should only look in exclusive stores, or descend to shared ones as well
Returns:
whether or not the Invocation was contextualised.
Throws:
InvocationException

getEmoter

protected abstract Emoter getEmoter()
Returns:
- an Emoter that facilitates removal of Motables from this Contextualiser's own store

getImmoter

protected abstract Immoter getImmoter()
Returns:
- an Immoter that facilitates insertion of Motables into this Contextualiser's own store

getPromoter

protected Immoter getPromoter(Immoter immoter)

get

protected abstract Motable get(java.lang.String id,
                               boolean exclusiveOnly)

handle

protected boolean handle(Invocation invocation,
                         java.lang.String id,
                         Immoter immoter,
                         boolean exclusiveOnly)
                  throws InvocationException
Throws:
InvocationException

promote

protected boolean promote(Invocation invocation,
                          java.lang.String id,
                          Immoter immoter,
                          Motable emotable)
                   throws InvocationException
Throws:
InvocationException


Copyright © 2008. All Rights Reserved.