ch.elca.el4j.core.contextpassing
Interface ImplicitContextPassingRegistry

All Known Implementing Classes:
DefaultImplicitContextPassingRegistry

public interface ImplicitContextPassingRegistry

Registry for implicit context passers. This registry has to be set up with the remote module to enable implicit context passing. Every bean that uses passing of implicit contexts needs to have a context passer bean extending ImplicitContextPasser and register it in the registry. In the client - server scenario, one registry instance on the client side and another one on the server side is needed.

Author:
Andreas Pfenninger (APR)
File-location:
ImplicitContextPassingRegistry
Last check-in date:
2009-08-04 14:35:53 +0200 (Di, 04. Aug 2009) by swismer for revision 3875

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.
 

Method Detail

registerImplicitContextPasser

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

Parameters:
passer - The implicit context passer to register.

unregisterImplicitContextPasser

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

Parameters:
passer - The implicit context passer to unregister.

getAssembledImplicitContext

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.

Returns:
The implicit context map.

pushAssembledImplicitContext

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.

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.