org.objectweb.speedo.pm.api
Interface ProxyManagerSwitch

All Known Implementing Classes:
SpeedoProxyManagerSwitch

public interface ProxyManagerSwitch

This interfaces defines a ProxyManager switch. It binds a thread to a list of ProxyManager. In a same context two proxy managers cannot be managed by the same PersistentManagerFactory.

Author:
S.Chassande-Barrioz

Method Summary
 void bind(ProxyManager pm)
          It assignes a ProxyManager to the current context.
 void clear()
          It clears the list of ProxyManager for the current context.
 java.util.Collection entries()
           
 ProxyManager lookup(ProxyManagerFactory pmf)
           
 boolean unbind(ProxyManager pm)
          It clears a ProxyManager for the current context.
 boolean unbind(ProxyManagerFactory pmf)
          It clears the ProxyManager associated to a ProxyManagerFactory for the current context
 

Method Detail

lookup

public ProxyManager lookup(ProxyManagerFactory pmf)
Parameters:
pmf - is persistent manager factory which manages the returned proxy manager.
Returns:
the ProxyManager managed by the given persistence manager factory and bound to current the context, or the null value if there is no ProxyManager.

bind

public void bind(ProxyManager pm)
It assignes a ProxyManager to the current context.

Parameters:
pm - is the ProxyManager

clear

public void clear()
It clears the list of ProxyManager for the current context.


unbind

public boolean unbind(ProxyManager pm)
It clears a ProxyManager for the current context.

Returns:
true if the specified pm has been unbound from the context/thread

unbind

public boolean unbind(ProxyManagerFactory pmf)
It clears the ProxyManager associated to a ProxyManagerFactory for the current context

Returns:
true if a pm associated to the specified PMF, has been unbound from the context/thread

entries

public java.util.Collection entries()
Returns:
all ProxyManager instances bound with the current context