Package org.jini.rio.boot
Class RioServiceDescriptor
java.lang.Object
org.jini.rio.boot.RioServiceDescriptor
- All Implemented Interfaces:
ServiceDescriptor
The RioServiceDescriptor class is a utility that conforms to the Jini technology ServiceStarter
framework, and will start a service using the
CommonClassLoader as a
shared, non-activatable, in-process service. Clients construct this object with the details of
the service to be launched, then call create to launch the service in invoking
object's VM. This class provides separation of the import codebase (where the server classes are loaded from) from the export codebase (where clients should load classes from for stubs,etc.) as well as providing an independent security policy file for each service object. This functionality allows multiple service objects to be placed in the same VM, with each object maintaining a distinct codebase and policy.
Services need to implement the following "non-activatable constructor":
<impl>(String[] args, LifeCycle lc)where,
- args - are the service configuration arguments
- lc - is the hosting environment's
LifeCyclereference.
-
Constructor Summary
ConstructorsConstructorDescriptionRioServiceDescriptor(String name, String codebase, String classpath, String implClassName, String[] serverConfigArgs) Create a RioServiceDescriptor.RioServiceDescriptor(String name, String codebase, String policy, String classpath, String implClassName, String[] serverConfigArgs, LifeCycle lifeCycle) Create a RioServiceDescriptor, assigning given parameters to their associated, internal fields. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Configuration config) Creates an object described by the actualServiceDescriptorinstance.LifCycle accessor method.Codebase accessor method.static AggregatePolicyProviderImplementation class accessor method.LifeCycleaccessor method.Policy accessor method.String[]Service configuration arguments accessor method.toString()
-
Constructor Details
-
RioServiceDescriptor
public RioServiceDescriptor(String name, String codebase, String policy, String classpath, String implClassName, String[] serverConfigArgs, LifeCycle lifeCycle) Create a RioServiceDescriptor, assigning given parameters to their associated, internal fields.- Parameters:
codebase- location where clients can download required service-related classes (for example, stubs, proxies, etc.). Codebase components must be separated by spaces in which each component is inURLformat.policy- server policy filename or URLclasspath- location where server implementation classes can be found. Classpath components must be separated by path separators.implClassName- name of server implementation classserverConfigArgs- service configuration argumentslifeCycle-LifeCyclereference for hosting environment
-
RioServiceDescriptor
public RioServiceDescriptor(String name, String codebase, String classpath, String implClassName, String[] serverConfigArgs) Create a RioServiceDescriptor. Equivalent to calling the other overloaded constructor withnullfor theLifeCyclereference.
-
-
Method Details
-
getGlobalPolicy
-
getCodebase
Codebase accessor method.- Returns:
- The codebase string associated with this service descriptor.
-
getPolicy
Policy accessor method.- Returns:
- The policy string associated with this service descriptor.
-
getLifeCycle
LifeCycleaccessor method.- Returns:
- The
LifeCycleobject associated with this service descriptor.
-
getClasspath
LifCycle accessor method.- Returns:
- The classpath string associated with this service descriptor.
-
getImplClassName
Implementation class accessor method.- Returns:
- The implementation class string associated with this service descriptor.
-
getServerConfigArgs
Service configuration arguments accessor method.- Returns:
- The service configuration arguments associated with this service descriptor.
-
create
Description copied from interface:ServiceDescriptorCreates an object described by the actualServiceDescriptorinstance.- Specified by:
createin interfaceServiceDescriptor- Parameters:
config- TheConfigurationobject used to configure the creation of the returned object.- Returns:
- An object instance appropriate for the given service descriptor instance.
- Throws:
Exception- Thrown if there was any problem creating the object.- See Also:
-
toString
-