ch.elca.el4j.core.contextpassing
Class DefaultImplicitContextPassingRegistry

java.lang.Object
  extended by ch.elca.el4j.core.contextpassing.DefaultImplicitContextPassingRegistry
All Implemented Interfaces:
ImplicitContextPassingRegistry

public class DefaultImplicitContextPassingRegistry
extends Object
implements ImplicitContextPassingRegistry

Default implementation of ImplicitContextPassingRegistry. To register the implicit context passers, their classname is used as id.

Author:
Andreas Pfenninger (APR)
File-location:
DefaultImplicitContextPassingRegistry
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Constructor Summary
DefaultImplicitContextPassingRegistry()
           
 
Method Summary
 Map<String,Object> getAssembledImplicitContext()
          This method is used by remoting infrastructures on the client side to collect what needs to be added to the context.
 void pushAssembledImplicitContext(Map<String,Object> contexts)
          This method is used by remoting infrastructures on the server side to push the context to the beans.
 void registerImplicitContextPasser(ImplicitContextPasser passer)
          Register a new implicit context passer to the registry.
 void unregisterImplicitContextPasser(ImplicitContextPasser passer)
          Unregister a registered implicit context passer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImplicitContextPassingRegistry

public DefaultImplicitContextPassingRegistry()
Method Detail

registerImplicitContextPasser

public void registerImplicitContextPasser(ImplicitContextPasser passer)
Register a new implicit context passer to the registry.

Specified by:
registerImplicitContextPasser in interface ImplicitContextPassingRegistry
Parameters:
passer - The implicit context passer to register.

unregisterImplicitContextPasser

public void unregisterImplicitContextPasser(ImplicitContextPasser passer)
Unregister a registered implicit context passer.

Specified by:
unregisterImplicitContextPasser in interface ImplicitContextPassingRegistry
Parameters:
passer - The implicit context passer to unregister.

getAssembledImplicitContext

public Map<String,Object> getAssembledImplicitContext()
This method is used by remoting infrastructures on the client side to collect what needs to be added to the context. This method calls the getImplicitlyPassedContext method of all registered implicit context passers. It returns a map with the "id -> context" mapping that needs to be passed with the remote invocation.

Specified by:
getAssembledImplicitContext in interface ImplicitContextPassingRegistry
Returns:
The implicit context map.

pushAssembledImplicitContext

public void pushAssembledImplicitContext(Map<String,Object> contexts)
This method is used by remoting infrastructures on the server side to push the context to the beans. It calls the pushImplicitlyPassedContext method on all registered implicit context passers. Its context's parameter holds the "id -> context" mappings that are passed with the remote invocation.

Specified by:
pushAssembledImplicitContext in interface ImplicitContextPassingRegistry
Parameters:
contexts - The received implicit context map that holds the "id -> context" mappings that are passed with the remote invocation.


Copyright © 2005-2011 ELCA. All Rights Reserved.