Interface ReferenceFactoryManager
- All Superinterfaces:
IDLEntity
,Object
,Serializable
- All Known Implementing Classes:
ReferenceFactoryManagerImpl
An instance of this interface can be obtained from an ORB by calling resolve_initial_references( "ReferenceFactoryManager" ). The ORB will have an instance of this available if it is started with the property ORBConstants.USER_CONFIGURATOR_PREFIX + "com.sun.corba.ee.impl.oa.rfm.ReferenceManagerConfigurator" set to a value (usually we use "1" as the value, but that does not matter). This will cause the configurator to set up the ORB so that the ReferenceFactoryManager is available, so long as the configurator class is available. Since this code is in the optional package, this just means that the optional ORB package contents must be in the classpath.
Note that this interface is a simulated IDL local interface, but there is no actual IDL for this interface.
Note that the suspend and resume methods must be called from the same thread in order for the thread synchronization to be handled correctly. Calling either of the restart() methods guarantees this, but disallows more complex ORB configuration changes.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Must be called before any other operation.Create a new reference factory with the given policies.Find the ReferenceFactory with the given name.Get the ReferenceFactory name from a String[] adapterName, if adapterName is the name of a ReferenceFactory.getState()
The state of the ReferenceFactoryManager.boolean
void
restart()
Restart all ReferenceFactories.void
Restart all ReferenceFactories.void
Restart all ReferenceFactories.void
restartFactories
(Map<String, org.glassfish.pfl.basic.contain.Pair<ServantLocator, 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.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
-
Method Details
-
getState
ReferenceFactoryManager.RFMState getState()The state of the ReferenceFactoryManager.- Returns:
- whether the manager is READY or SUSPENDED
-
activate
void activate()Must be called before any other operation. Used to activate the ORB reference creation function. -
suspend
void suspend()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. -
resume
void resume()Resume all CORBA request processing on all references created by ReferenceFactory instances that were created by this ReferenceFactoryManager. -
create
ReferenceFactory create(String name, String repositoryId, List<Policy> policies, ServantLocator manager) 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
- 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.manager
- locator to use for the reference- Returns:
- resulting ReferenceFactory with given policies
-
find
Get the ReferenceFactory name from a String[] adapterName, if adapterName is the name of a ReferenceFactory. If not, return null.- Parameters:
adapterName
- of factory- Returns:
- found ReferenceFactory, null otherwise
-
find
Find the ReferenceFactory with the given name. If no such ReferenceFactory exists, return null.- Parameters:
name
- of factory- Returns:
- found ReferenceFactory, null otherwise
-
restartFactories
void restartFactories(Map<String, org.glassfish.pfl.basic.contain.Pair<ServantLocator, List<Policy>>> updates) Restart all ReferenceFactories.- 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
void restartFactories()Restart all ReferenceFactories. Equivalent to calling restartFactories( new Map() ). -
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. This method is equivalent to:suspend() ; try { restartFactories( updates ) ; } finally { resume() ; }
- 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
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() ). -
isRfmName
-