com.arjuna.orbportability.common
Class OrbPortabilityEnvironmentBean

java.lang.Object
  extended by 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
OrbPortabilityEnvironmentBean()
           
 
Method Summary
 String getBindMechanism()
          Returns the symbolic name of the configuration mechanism used for service bindings.
 List<String> getEventHandlerClassNames()
          Returns the class names for the ORB object connect/disconnect event handlers.
 List<EventHandler> getEventHandlers()
          Returns the set of EventHandler instances.
 String getFileDir()
          Returns the name of the directory to store reference files in.
 String getInitialReferencesFile()
          Returns the relative name of the file in which initial references are stored.
 String getInitialReferencesRoot()
          Returns the name of the directory in which the initial reference file is stored.
 ORBData getOrbData()
          Returns an instance of a class implementing ORBData.
 String getOrbDataClassName()
          Returns the class name of the ORBData implementation.
 Class<? extends ORBImple> getOrbImpleClass()
          Returns a class implementing ORBImple.
 String getOrbImpleClassName()
          Returns the class name of the ORBImple implementation.
 Map<String,String> getOrbInitializationProperties()
          Returns the Map used for the orb initialization parameters.
 Class<? extends POAImple> getPoaImpleClass()
          Returns a class implementing POAImple.
 String getPoaImpleClassName()
          Returns the class name of the POAImple implementation.
 String getResolveService()
          Returns the symbolic name of the configuration mechanism for resolving service references.
 void 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 direcory 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 ORBData
 void 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrbPortabilityEnvironmentBean

public OrbPortabilityEnvironmentBean()
Method Detail

getInitialReferencesRoot

public String 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
the path to the directory in which initial references are stored.

setInitialReferencesRoot

public void setInitialReferencesRoot(String initialReferencesRoot)
Sets the name of the directory in which the initial reference file is stored.

Parameters:
initialReferencesRoot - the path to the directory.

getInitialReferencesFile

public String 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the initial references file.

setInitialReferencesFile

public void setInitialReferencesFile(String initialReferencesFile)
Sets the name of the initial references file.

Parameters:
initialReferencesFile - the file name, without directory path.

getFileDir

public String 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
the path to the reference file directory.

setFileDir

public void setFileDir(String fileDir)
Sets the name of the direcory to store reference files in.

Parameters:
fileDir - the path to the reference file directory.

getResolveService

public String 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the configuration mechanism for service references.

setResolveService

public void setResolveService(String resolveService)
Sets the symbolic name of the configuration mechanism for resolving service references.

Parameters:
resolveService - the name of the service resolution configuration mechanism.

getEventHandlerClassNames

public List<String> 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
a list of names of classes, being implementations of the EventHandler interface.

setEventHandlerClassNames

public void setEventHandlerClassNames(List<String> eventHandlerClassNames)
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

public List<EventHandler> 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

public void setEventHandlers(List<EventHandler> eventHandlers)
Sets the instances of EventHandler. The provided list will be copied, not retained.

Parameters:
eventHandlers - the set of EventHandler instances.

getOrbImpleClassName

public String getOrbImpleClassName()
Returns the class name of the ORBImple implementation. Default: com.arjuna.orbportability.internal.orbspecific.jacorb.orb.implementations.jacorb_2_0 Equivalent deprecated property: com.arjuna.orbportability.orbImplementation

Specified by:
getOrbImpleClassName in interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the class implementing ORBImple.

setOrbImpleClassName

public void setOrbImpleClassName(String orbImpleClassName)
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

public Class<? extends 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

public void setOrbImpleClass(Class<? extends ORBImple> orbImpleClass)
Sets the ORBImple implementation class. The class should have a public default constructor.

Parameters:
orbImpleClass - a Class that implements ORBImple

getPoaImpleClassName

public String getPoaImpleClassName()
Returns the class name of the POAImple implementation. Default: com.arjuna.orbportability.internal.orbspecific.jacorb.oa.implementations.jacorb_2_0 Equivalent deprecated property: com.arjuna.orbportability.oaImplementation

Specified by:
getPoaImpleClassName in interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the class implementing POAImple.

setPoaImpleClassName

public void setPoaImpleClassName(String poaImpleClassName)
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

public Class<? extends 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

public void setPoaImpleClass(Class<? extends POAImple> poaImpleClass)
Sets the POAImple implementation class. The class should have a public default constructor.

Parameters:
poaImpleClass - a Class that implements POAImple

getOrbDataClassName

public String getOrbDataClassName()
Returns the class name of the ORBData implementation. Default: com.arjuna.orbportability.internal.orbspecific.versions.jacorb_2_0

Specified by:
getOrbDataClassName in interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the class implementing ORBData.

setOrbDataClassName

public void setOrbDataClassName(String orbDataClassName)
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

public 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

public void setOrbData(ORBData instance)
Sets the instance of ORBData

Parameters:
instance - an Object that implements ORBData, or null.

getBindMechanism

public String 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
the name of the service binding mechanism.

setBindMechanism

public void setBindMechanism(String bindMechanism)
Sets the symbolic name of the configuration mechanism used for service bindings.

Parameters:
bindMechanism - the name of the service binding mechanism.

getOrbInitializationProperties

public Map<String,String> 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 interface OrbPortabilityEnvironmentBeanMBean
Returns:
a Map containing ORB initialization information.

setOrbInitializationProperties

public void setOrbInitializationProperties(Map<String,String> orbInitializationProperties)
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.


Copyright © 2011. All Rights Reserved.