![]() |
OpenSplice Java 5 DCPS
v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
Classes | |
class | OpenSpliceServiceProviderInterface |
Public Member Functions | |
OsplServiceEnvironment (Map< String, Object > environment) | |
OsplServiceEnvironment () | |
final ServiceEnvironment | getEnvironment () |
Object | getEnvironmentValue (String name) |
ServiceProviderInterface | getSPI () |
Static Public Member Functions | |
static ServiceEnvironment | createInstance (ClassLoader classLoader) |
Create and return a new instance of a concrete implementation of this class with the given environment. More... | |
static ServiceEnvironment | createInstance (String implClassNameProperty, Map< String, Object > environment, ClassLoader classLoader) |
Look up the system property identified by the given string and load, then instantiate, the ServiceEnvironment implementation class identified by its value. More... | |
Static Public Attributes | |
static final String | IMPLEMENTATION_CLASS_NAME_PROPERTY |
Definition at line 50 of file OsplServiceEnvironment.java.
org.opensplice.dds.core.OsplServiceEnvironment.OsplServiceEnvironment | ( | Map< String, Object > | environment | ) |
Definition at line 54 of file OsplServiceEnvironment.java.
org.opensplice.dds.core.OsplServiceEnvironment.OsplServiceEnvironment | ( | ) |
Definition at line 63 of file OsplServiceEnvironment.java.
|
staticinherited |
Create and return a new instance of a concrete implementation of this class with the given environment.
This method is equivalent to calling:
createInstance(IMPLEMENTATION_CLASS_NAME_PROPERTY, null, classLoader);
Definition at line 79 of file ServiceEnvironment.java.
|
staticinherited |
Look up the system property identified by the given string and load, then instantiate, the ServiceEnvironment implementation class identified by its value.
The class must be accessible and have a public constructor.
The public constructors of the implementation class will first be searched for one accepting a single argument of type Map. If one is found, it will be called with the environment
map provided to this method as its argument. If no such constructor is found, a no-argument constructor will be used instead, and the provided environment
, if any, will be ignored. If the implementation class provides no public constructor with either of these signatures, an exception will be thrown.
By default, the class loader for the ServiceEnvironment
class will be used to load the indicated class. If this class loader is null – for instance, if it is the bootstrap class loader – then the system class loader will be used in its place. If it is also null, a ServiceConfigurationException
will be thrown.
Neither the class loader nor the loaded class will be cached between invocations of this method. As a result, execution of this method is expected to be relatively expensive. However, as any DDS object can provide a reference to its creating ServiceEnvironment via org.omg.dds.core.DDSObject#getEnvironment(), executions of this method are also expected to be rare.
implClassNameProperty | The name of a system property, the value of which will be taken as the name of a ServiceEnvironment implementation class to load. |
environment | A collection of name-value pairs to be provided to the concrete ServiceEnvironment subclass. If that class does not provide a constructor that can accept this environment, the environment will be ignored. This argument may be null; a null environment shall be considered equivalent to an empty map. |
classLoader | The class loader to use to load the service implementation class. If it is null, this class's class loader will be used if it is accessible; otherwise, the system class loader will be used. |
NullPointerException | If the given property name is null. |
IllegalArgumentException | If the given property name is the empty string. |
ServiceConfigurationException | If the class could not be loaded because of an issue with the the invocation of this method or the configuration of the runtime environment. For example, the class may not be on the class path, it may require a native library that is not available, or an inappropriate class may have been requested (e.g. one that is not a ServiceEnvironment or that doesn't have a no-argument constructor). |
ServiceInitializationException | If the class was found but could not be initialized and/or instantiated because of an error that occurred within its implementation. |
Definition at line 156 of file ServiceEnvironment.java.
|
inherited |
Implements org.omg.dds.core.DDSObject.
Definition at line 289 of file ServiceEnvironment.java.
Object org.opensplice.dds.core.OsplServiceEnvironment.getEnvironmentValue | ( | String | name | ) |
Definition at line 68 of file OsplServiceEnvironment.java.
ServiceProviderInterface org.opensplice.dds.core.OsplServiceEnvironment.getSPI | ( | ) |
Definition at line 80 of file OsplServiceEnvironment.java.
|
staticinherited |
Definition at line 50 of file ServiceEnvironment.java.