org.objectweb.speedo.pm.api
Interface POManagerSwitchItf

All Known Implementing Classes:
POManagerSwitchImpl

public interface POManagerSwitchItf

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

Author:
S.Chassande-Barrioz

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

Method Detail

lookup

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

bind

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

Parameters:
pm - is the POManagerItf

clear

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


unbind

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

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

unbind

boolean unbind(POManagerFactoryItf pmf)
It clears the POManagerItf associated to a POManagerFactoryItf for the current context

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

entries

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