Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.boot
Class RioServiceDescriptor

    java.lang.Object
      org.jini.rio.boot.RioServiceDescriptor

All Implemented Interfaces:
  ServiceDescriptor

Direct Known Subclasses:
  RioActivatableServiceDescriptor

    public class RioServiceDescriptor

extends Object
implements 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 `LifeCycle` reference.

> Constructor Summary
> `RioServiceDescriptor(String codebase, String policy, String classpath, String implClassName, String[] serverConfigArgs)` Create a RioServiceDescriptor.
> `RioServiceDescriptor(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
> `Object` | `create(Configuration config)`
> `String` | `getClasspath()` LifCycle accessor method.
> `String` | `getCodebase()` Codebase accessor method.
> `String` | `getImplClassName()` Implementation class accessor method.
> `LifeCycle` | `getLifeCycle()` `LifeCycle` accessor method.
> `String` | `getPolicy()` Policy accessor method.
> `String[]` | `getServerConfigArgs()` Service configuration arguments accessor method.
> `String` | `toString()`

> Methods inherited from class java.lang.Object
> `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

> Constructor Detail

> ### RioServiceDescriptor

>     public RioServiceDescriptor(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 in `URL` format.
>     `policy` - server policy filename or URL
>     `classpath` - location where server implementation classes can be found. Classpath components must be separated by path separators.
>     `implClassName` - name of server implementation class
>     `serverConfigArgs` - service configuration arguments
>     `lifeCycle` - `LifeCycle` reference for hosting environment

> ### RioServiceDescriptor

>     public RioServiceDescriptor(String codebase,
>                                 String policy,
>                                 String classpath,
>                                 String implClassName,
>                                 String[] serverConfigArgs)

>   Create a RioServiceDescriptor. Equivalent to calling the other overloaded constructor with `null` for the `LifeCycle` reference.

>   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 in `URL` format.
>     `policy` - server policy filename or URL
>     `classpath` - location where server implementation classes can be found. Classpath components must be separated by path separators.
>     `implClassName` - name of server implementation class
>     `serverConfigArgs` - service configuration arguments

> Method Detail

> ### getCodebase

>     public String getCodebase()

>   Codebase accessor method.

>   Returns:
>     The codebase string associated with this service descriptor.

> ### getPolicy

>     public String getPolicy()

>   Policy accessor method.

>   Returns:
>     The policy string associated with this service descriptor.

> ### getLifeCycle

>     public LifeCycle getLifeCycle()

>   `LifeCycle` accessor method.

>   Returns:
>     The `LifeCycle` object associated with this service descriptor.

> ### getClasspath

>     public String getClasspath()

>   LifCycle accessor method.

>   Returns:
>     The classpath string associated with this service descriptor.

> ### getImplClassName

>     public String getImplClassName()

>   Implementation class accessor method.

>   Returns:
>     The implementation class string associated with this service descriptor.

> ### getServerConfigArgs

>     public String[] getServerConfigArgs()

>   Service configuration arguments accessor method.

>   Returns:
>     The service configuration arguments associated with this service descriptor.

> ### create

>     public Object create(Configuration config)
>                   throws Exception

>   Specified by:
>     `create` in interface `ServiceDescriptor`
>   Throws:
>     `Exception`
>   See Also:
>     `ServiceDescriptor.create(net.jini.config.Configuration)`

> ### toString

>     public String toString()

>   Overrides:
>     `toString` in class `Object`

> Overview | Package | Class | Use | Tree | Deprecated | Index | Help
> | Project Rio
> PREV CLASS NEXT CLASS | FRAMES NO FRAMES
> SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

> Copyright © Project Rio.