Package com.sun.corba.ee.impl.oa.rfm
Class ReferenceFactoryManagerImpl
- java.lang.Object
-
- org.omg.CORBA.LocalObject
-
- com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryManagerImpl
-
- All Implemented Interfaces:
ReferenceFactoryManager
,java.io.Serializable
,Object
,IDLEntity
@ManagedObject @Description("The ReferenceFactoryManager, used to handle dynamic cluster membership updates") public class ReferenceFactoryManagerImpl extends LocalObject implements ReferenceFactoryManager
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ReferenceFactoryManagerImpl.AdapterActivatorImpl
private static class
ReferenceFactoryManagerImpl.ReferenceManagerPolicy
-
Nested classes/interfaces inherited from interface com.sun.corba.ee.spi.oa.rfm.ReferenceFactoryManager
ReferenceFactoryManager.RFMState
-
-
Field Summary
Fields Modifier and Type Field Description private AdapterActivator
activator
private java.util.Map<java.lang.String,ReferenceFactory>
factories
private boolean
isActive
private java.util.concurrent.locks.ReentrantLock
lock
private java.util.Set<POAManager>
managers
private ORB
orb
private static java.lang.String
PARENT_POA_NAME
private POA
parentPOA
private java.lang.String[]
parentPOAAdapterName
private java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>>
poatable
private POA
rootPOA
private static long
serialVersionUID
private java.util.List<Policy>
standardPolicies
private ReferenceFactoryManager.RFMState
state
private java.util.concurrent.locks.Condition
suspendCondition
private static POASystemException
wrapper
-
Constructor Summary
Constructors Constructor Description ReferenceFactoryManagerImpl(ORB orb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Must be called before any other operation.ReferenceFactory
create(java.lang.String name, java.lang.String repositoryId, java.util.List<Policy> policies, ServantLocator locator)
Create a new reference factory with the given policies.(package private) Object
createReference(java.lang.String name, byte[] key, java.lang.String repositoryId)
(package private) void
destroy(java.lang.String name)
ReferenceFactory
find(java.lang.String name)
Find the ReferenceFactory with the given name.ReferenceFactory
find(java.lang.String[] adapterName)
Get the ReferenceFactory name from a String[] adapterName, if adapterName is the name of a ReferenceFactory.ReferenceFactoryManager.RFMState
getState()
The state of the ReferenceFactoryManager.boolean
isRfmName(java.lang.String[] adapterName)
void
restart()
Restart all ReferenceFactories.void
restart(java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>> updates)
Restart all ReferenceFactories.void
restartFactories()
Restart all ReferenceFactories.void
restartFactories(java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>> updates)
Restart all ReferenceFactories.void
resume()
Resume all CORBA request processing on all references created by ReferenceFactory instances that were created by this ReferenceFactoryManager.void
suspend()
Suspend all CORBA request processing on all references created by ReferenceFactory instances that were created by this ReferenceFactoryManager.(package private) void
validatePOACreation(POA poa)
-
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
-
-
-
-
Field Detail
-
wrapper
private static final POASystemException wrapper
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
PARENT_POA_NAME
private static final java.lang.String PARENT_POA_NAME
- See Also:
- Constant Field Values
-
state
private ReferenceFactoryManager.RFMState state
-
lock
private final java.util.concurrent.locks.ReentrantLock lock
-
suspendCondition
private final java.util.concurrent.locks.Condition suspendCondition
-
orb
private final ORB orb
-
poatable
private final java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>> poatable
-
factories
private final java.util.Map<java.lang.String,ReferenceFactory> factories
-
managers
private final java.util.Set<POAManager> managers
-
activator
private final AdapterActivator activator
-
isActive
private volatile boolean isActive
-
rootPOA
private POA rootPOA
-
standardPolicies
private java.util.List<Policy> standardPolicies
-
parentPOA
private POA parentPOA
-
parentPOAAdapterName
private java.lang.String[] parentPOAAdapterName
-
-
Constructor Detail
-
ReferenceFactoryManagerImpl
public ReferenceFactoryManagerImpl(ORB orb)
-
-
Method Detail
-
getState
public ReferenceFactoryManager.RFMState getState()
Description copied from interface:ReferenceFactoryManager
The state of the ReferenceFactoryManager.- Specified by:
getState
in interfaceReferenceFactoryManager
- Returns:
- whether the manager is READY or SUSPENDED
-
activate
public void activate()
Description copied from interface:ReferenceFactoryManager
Must be called before any other operation. Used to activate the ORB reference creation function.- Specified by:
activate
in interfaceReferenceFactoryManager
-
create
public ReferenceFactory create(java.lang.String name, java.lang.String repositoryId, java.util.List<Policy> policies, ServantLocator locator)
Description copied from interface:ReferenceFactoryManager
Create a new reference factory with the given policies. All such reference factories will be persistent. The ServantLocator is solely responsible for creating servants: no internal caching will be performed. The following policies are always applied here:- Servant retention policy NON_RETAIN
- Request processing policy USE_SERVANT_MANAGER
- Lifespan policy PERSISTENT
- Specified by:
create
in interfaceReferenceFactoryManager
- Parameters:
name
- is the name of this ReferenceFactory. This is a simple flat name, not a hierarchical name.repositoryId
- is the repoid to be used when this reference factory creates a new CORBA Object reference.policies
- are the policies to be used to create the underlying POA.locator
- locator to use for the reference- Returns:
- resulting ReferenceFactory with given policies
-
find
public ReferenceFactory find(java.lang.String[] adapterName)
Description copied from interface:ReferenceFactoryManager
Get the ReferenceFactory name from a String[] adapterName, if adapterName is the name of a ReferenceFactory. If not, return null.- Specified by:
find
in interfaceReferenceFactoryManager
- Parameters:
adapterName
- of factory- Returns:
- found ReferenceFactory, null otherwise
-
find
public ReferenceFactory find(java.lang.String name)
Description copied from interface:ReferenceFactoryManager
Find the ReferenceFactory with the given name. If no such ReferenceFactory exists, return null.- Specified by:
find
in interfaceReferenceFactoryManager
- Parameters:
name
- of factory- Returns:
- found ReferenceFactory, null otherwise
-
suspend
public void suspend()
Description copied from interface:ReferenceFactoryManager
Suspend all CORBA request processing on all references created by ReferenceFactory instances that were created by this ReferenceFactoryManager. This call does not return until after all currently executing calls have completed.- Specified by:
suspend
in interfaceReferenceFactoryManager
-
resume
public void resume()
Description copied from interface:ReferenceFactoryManager
Resume all CORBA request processing on all references created by ReferenceFactory instances that were created by this ReferenceFactoryManager.- Specified by:
resume
in interfaceReferenceFactoryManager
-
restartFactories
public void restartFactories(java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>> updates)
Description copied from interface:ReferenceFactoryManager
Restart all ReferenceFactories.- Specified by:
restartFactories
in interfaceReferenceFactoryManager
- Parameters:
updates
- is a map giving the updated policies for some or all of the ReferenceFactory instances in this ReferenceFactoryManager. This parameter must not be null.
-
restartFactories
public void restartFactories()
Description copied from interface:ReferenceFactoryManager
Restart all ReferenceFactories. Equivalent to calling restartFactories( new Map() ).- Specified by:
restartFactories
in interfaceReferenceFactoryManager
-
restart
public void restart(java.util.Map<java.lang.String,org.glassfish.pfl.basic.contain.Pair<ServantLocator,java.util.List<Policy>>> updates)
Restart all ReferenceFactories. This is done safely, so that any request against object references created from these factories complete correctly. Restart does not return until all restart activity completes.- Specified by:
restart
in interfaceReferenceFactoryManager
- Parameters:
updates
- is a map giving the updated policies for some or all of the ReferenceFactory instances in this ReferenceFactoryManager. This parameter must not be null.
-
restart
public void restart()
Restart all ReferenceFactories. This is done safely, so that any request against object references created from these factories complete correctly. Restart does not return until all restart activity completes. Equivalent to calling restart( new Map() ).- Specified by:
restart
in interfaceReferenceFactoryManager
-
createReference
Object createReference(java.lang.String name, byte[] key, java.lang.String repositoryId)
-
destroy
void destroy(java.lang.String name)
-
validatePOACreation
void validatePOACreation(POA poa)
-
isRfmName
public boolean isRfmName(java.lang.String[] adapterName)
- Specified by:
isRfmName
in interfaceReferenceFactoryManager
-
-