org.codehaus.wadi.core.contextualiser
Class DummyContextualiser

java.lang.Object
  extended by org.codehaus.wadi.core.contextualiser.DummyContextualiser
All Implemented Interfaces:
Contextualiser, Lifecycle

public class DummyContextualiser
extends java.lang.Object
implements Contextualiser

A Contextualiser that does no contextualising

Version:
$Revision: 2374 $
Author:
Jules Gosnell

Nested Class Summary
 class DummyContextualiser.DummyImmoter
           
 
Field Summary
protected  Evicter _evicter
           
protected  Immoter _immoter
           
 
Constructor Summary
DummyContextualiser(StateManager stateManager)
           
 
Method Summary
 boolean contextualise(Invocation invocation, java.lang.String key, Immoter immoter, boolean exclusiveOnly)
          Contextualise the given Invocation.
 void findRelevantSessionNames(PartitionMapper mapper, java.util.Map keyToSessionNames)
           
 Immoter getDemoter(java.lang.String name, Motable motable)
          Return an immoter to the first Contextualiser below us, which would be happy to accept this Motable - in other words - would not evict() it.
 Evicter getEvicter()
           
 java.util.Set getSessionNames()
           
 Immoter getSharedDemoter()
          Return an Immoter to the first SharedContextualiser below us.
 void promoteToExclusive(Immoter immoter)
          Pass this Immoter up to the first ExclusiveContextualiser above us, where...
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_evicter

protected final Evicter _evicter

_immoter

protected final Immoter _immoter
Constructor Detail

DummyContextualiser

public DummyContextualiser(StateManager stateManager)
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.

Specified by:
contextualise in interface Contextualiser
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

getEvicter

public Evicter getEvicter()

getSessionNames

public java.util.Set getSessionNames()
Specified by:
getSessionNames in interface Contextualiser

findRelevantSessionNames

public void findRelevantSessionNames(PartitionMapper mapper,
                                     java.util.Map keyToSessionNames)
Specified by:
findRelevantSessionNames in interface Contextualiser

getDemoter

public Immoter getDemoter(java.lang.String name,
                          Motable motable)
Description copied from interface: Contextualiser
Return an immoter to the first Contextualiser below us, which would be happy to accept this Motable - in other words - would not evict() it.

Specified by:
getDemoter in interface Contextualiser
Parameters:
name - - uid of the Motable
motable - - the Motable in question
Returns:
- a Demoter - a delegate capable of arranging immotion into the correct Contextualiser

getSharedDemoter

public Immoter getSharedDemoter()
Description copied from interface: Contextualiser
Return an Immoter to the first SharedContextualiser below us.

Specified by:
getSharedDemoter in interface Contextualiser
Returns:
the Immoter

promoteToExclusive

public void promoteToExclusive(Immoter immoter)
Description copied from interface: Contextualiser
Pass this Immoter up to the first ExclusiveContextualiser above us, where...

Specified by:
promoteToExclusive in interface Contextualiser
Parameters:
immoter - the Immoter

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Lifecycle
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface Lifecycle
Throws:
java.lang.Exception


Copyright © 2010. All Rights Reserved.