Package com.arjuna.orbportability.common
Class OrbPortabilityEnvironmentBean
java.lang.Object
com.arjuna.orbportability.common.OrbPortabilityEnvironmentBean
- All Implemented Interfaces:
OrbPortabilityEnvironmentBeanMBean
public class OrbPortabilityEnvironmentBean
extends Object
implements OrbPortabilityEnvironmentBeanMBean
A JavaBean containing assorted configuration properties for the Orb Portability layer.
- Author:
- Jonathan Halliday (jonathan.halliday@redhat.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the symbolic name of the configuration mechanism used for service bindings.Returns the class names for the ORB object connect/disconnect event handlers.Returns the set of EventHandler instances.Returns the name of the directory to store reference files in.Returns the relative name of the file in which initial references are stored.Returns the name of the directory in which the initial reference file is stored.Returns an instance of a class implementing ORBData.Returns the class name of the ORBData implementation.Returns a class implementing ORBImple.Returns the class name of the ORBImple implementation.Returns the Map used for the orb initialization parameters.Returns a class implementing POAImple.Returns the class name of the POAImple implementation.Returns the symbolic name of the configuration mechanism for resolving service references.boolean
Indicates whether the orb wrapped by the orb portability layer will be shutdown when the orb portability layer is shutdownvoid
setBindMechanism
(String bindMechanism) Sets the symbolic name of the configuration mechanism used for service bindings.void
setEventHandlerClassNames
(List<String> eventHandlerClassNames) Sets the class names of the ORB object connect/disconnect event handlers.void
setEventHandlers
(List<EventHandler> eventHandlers) Sets the instances of EventHandler.void
setFileDir
(String fileDir) Sets the name of the directory to store reference files in.void
setInitialReferencesFile
(String initialReferencesFile) Sets the name of the initial references file.void
setInitialReferencesRoot
(String initialReferencesRoot) Sets the name of the directory in which the initial reference file is stored.void
setOrbData
(ORBData instance) Sets the instance of ORBDatavoid
setOrbDataClassName
(String orbDataClassName) Sets the class name of the ORBData implementation.void
setOrbImpleClass
(Class<? extends ORBImple> orbImpleClass) Sets the ORBImple implementation class.void
setOrbImpleClassName
(String orbImpleClassName) Sets the class name of the ORBImple implementation.void
setOrbInitializationProperties
(Map<String, String> orbInitializationProperties) Sets the Map of properties used for ORB initialization.void
setPoaImpleClass
(Class<? extends POAImple> poaImpleClass) Sets the POAImple implementation class.void
setPoaImpleClassName
(String poaImpleClassName) Sets the class name of the POAImple implementation.void
setResolveService
(String resolveService) Sets the symbolic name of the configuration mechanism for resolving service references.void
setShutdownWrappedOrb
(boolean shutdownWrappedOrb) The orb portability layer wraps the actual orb implementation.
-
Constructor Details
-
OrbPortabilityEnvironmentBean
public OrbPortabilityEnvironmentBean()
-
-
Method Details
-
getInitialReferencesRoot
Returns the name of the directory in which the initial reference file is stored. Default: value of System.getProperty("user.dir") Equivalent deprecated property: com.arjuna.orbportability.initialReferencesRoot- Specified by:
getInitialReferencesRoot
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the path to the directory in which initial references are stored.
-
setInitialReferencesRoot
Sets the name of the directory in which the initial reference file is stored.- Parameters:
initialReferencesRoot
- the path to the directory.
-
getInitialReferencesFile
Returns the relative name of the file in which initial references are stored. Default: "CosServices.cfg" Equivalent deprecated property: com.arjuna.orbportability.initialReferencesFile- Specified by:
getInitialReferencesFile
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the initial references file.
-
setInitialReferencesFile
Sets the name of the initial references file.- Parameters:
initialReferencesFile
- the file name, without directory path.
-
getFileDir
Returns the name of the directory to store reference files in. Default: null Equivalent deprecated property: com.arjuna.orbportability.fileDir- Specified by:
getFileDir
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the path to the reference file directory.
-
setFileDir
Sets the name of the directory to store reference files in.- Parameters:
fileDir
- the path to the reference file directory.
-
getResolveService
Returns the symbolic name of the configuration mechanism for resolving service references. Default: "CONFIGURATION_FILE" Equivalent deprecated property: com.arjuna.orbportability.resolveService- Specified by:
getResolveService
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the configuration mechanism for service references.
-
setResolveService
Sets the symbolic name of the configuration mechanism for resolving service references.- Parameters:
resolveService
- the name of the service resolution configuration mechanism.
-
getEventHandlerClassNames
Returns the class names for the ORB object connect/disconnect event handlers. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix: com.arjuna.orbportability.eventHandler- Specified by:
getEventHandlerClassNames
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- a list of names of classes, being implementations of the EventHandler interface.
-
setEventHandlerClassNames
Sets the class names of the ORB object connect/disconnect event handlers. List elements should be names of classes that implement EventHandler. The provided list will be copied, not retained.- Parameters:
eventHandlerClassNames
- a list of EventHandler implementation classnames.
-
getEventHandlers
Returns the set of EventHandler instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.- Returns:
- the set of EventHandler instances.
-
setEventHandlers
Sets the instances of EventHandler. The provided list will be copied, not retained.- Parameters:
eventHandlers
- the set of EventHandler instances.
-
getOrbImpleClassName
Returns the class name of the ORBImple implementation. Default: com.arjuna.orbportability.internal.orbspecific.javaidl.orb.implementations.javaidl_1_4 Equivalent deprecated property: com.arjuna.orbportability.orbImplementation- Specified by:
getOrbImpleClassName
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the class implementing ORBImple.
-
setOrbImpleClassName
Sets the class name of the ORBImple implementation. The class should have a public default constructor.- Parameters:
orbImpleClassName
- the name of the class implementing ORBImple.
-
getOrbImpleClass
Returns a class implementing ORBImple. If classloading fails, this method will log an appropriate warning and return null, not throw an exception.- Returns:
- an ORBImple implementation instance, or null.
-
setOrbImpleClass
Sets the ORBImple implementation class. The class should have a public default constructor.- Parameters:
orbImpleClass
- a Class that implements ORBImple
-
getPoaImpleClassName
Returns the class name of the POAImple implementation. Default: com.arjuna.orbportability.internal.orbspecific.javaidl.oa.implementations.javaidl_1_4 Equivalent deprecated property: com.arjuna.orbportability.oaImplementation- Specified by:
getPoaImpleClassName
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the class implementing POAImple.
-
setPoaImpleClassName
Sets the class name of the POAImple implementation. The class should have a public default constructor.- Parameters:
poaImpleClassName
- the name of the class implementing POAImple.
-
getPoaImpleClass
Returns a class implementing POAImple. If classloading fails, this method will log an appropriate warning and return null, not throw an exception.- Returns:
- an POAImple implementation instance, or null.
-
setPoaImpleClass
Sets the POAImple implementation class. The class should have a public default constructor.- Parameters:
poaImpleClass
- a Class that implements POAImple
-
getOrbDataClassName
Returns the class name of the ORBData implementation. Default: com.arjuna.orbportability.internal.orbspecific.versions.javaidl_1_4- Specified by:
getOrbDataClassName
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the class implementing ORBData.
-
setOrbDataClassName
Sets the class name of the ORBData implementation. The class should have a public default constructor.- Parameters:
orbDataClassName
- the name of the class implementing ORBData.
-
getOrbData
Returns an instance of a class implementing ORBData. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log an appropriate warning and return null, not throw an exception.- Returns:
- an ORBData implementation instance, or null.
-
setOrbData
Sets the instance of ORBData- Parameters:
instance
- an Object that implements ORBData, or null.
-
getBindMechanism
Returns the symbolic name of the configuration mechanism used for service bindings. Default: "CONFIGURATION_FILE" Equivalent deprecated property: com.arjuna.orbportability.bindMechanism- Specified by:
getBindMechanism
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- the name of the service binding mechanism.
-
setBindMechanism
Sets the symbolic name of the configuration mechanism used for service bindings.- Parameters:
bindMechanism
- the name of the service binding mechanism.
-
getOrbInitializationProperties
Returns the Map used for the orb initialization parameters. As there are potentially an arbitrary number of ORBs, each with an arbitrary set of initialization classes, it's not well suited to bean based properties :-( The returned object is a clone. May return an empty Map, will not return null. Default: empty Map.- Specified by:
getOrbInitializationProperties
in interfaceOrbPortabilityEnvironmentBeanMBean
- Returns:
- a Map containing ORB initialization information.
-
setOrbInitializationProperties
Sets the Map of properties used for ORB initialization. The provided Map will be copied, not retained.- Parameters:
orbInitializationProperties
- a Map containing ORB initialization information.
-
setShutdownWrappedOrb
public void setShutdownWrappedOrb(boolean shutdownWrappedOrb) The orb portability layer wraps the actual orb implementation. This property determines whether or shutting down the orb portability layer will also shutdown the actual orb. This method is useful for externally supplied orbs that should not be shutdown when the TransactionService is stopped- Parameters:
shutdownWrappedOrb
-
-
isShutdownWrappedOrb
public boolean isShutdownWrappedOrb()Indicates whether the orb wrapped by the orb portability layer will be shutdown when the orb portability layer is shutdown- Returns:
- true if the wrapped orb will be shutdown
-