|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.jini.start.NonActivatableServiceDescriptor
Class used to launch shared, non-activatable, in-process
services. 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":
where,<impl>(String[] args, LifeCycle lc)
LifeCycle reference.
| Nested Class Summary | |
static class |
NonActivatableServiceDescriptor.Created
Object returned by NonActivatableServiceDescriptor.create()
method that returns the proxy and implementation references
for the created service. |
| Constructor Summary | |
NonActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String[] serverConfigArgs)
Trivial constructor. |
|
NonActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String[] serverConfigArgs,
LifeCycle lifeCycle)
Trivial constructor. |
|
| Method Summary | |
Object |
create(Configuration config)
Method that attempts to create a service based on the service description information provided via constructor parameters. |
String |
getClasspath()
Classpath 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 |
public NonActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String[] serverConfigArgs,
LifeCycle lifeCycle)
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 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 - LifeCycle reference
for hosting environment
public NonActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String[] serverConfigArgs)
null for the LifeCycle
reference.
| Method Detail |
public final String getCodebase()
public final String getPolicy()
public final String getClasspath()
public final String getImplClassName()
public final String[] getServerConfigArgs()
public final LifeCycle getLifeCycle()
LifeCycle accessor method.
LifeCycle object associated with
this service descriptor.
public Object create(Configuration config)
throws Exception
This method:
ActivateWrapper.ExportClassLoader with
the provided import and export codebases
ExportClassLoader and the corresponding service
policy file with the AggregatePolicyProvider
ExportClassLoader as
the context class loader
<impl>(String[], LifeCycle)
ServiceProxyAccessor.getServiceProxy()
or
ProxyAccessor.getProxy(),
respectively, on the implementation instance.
If neither interface is supported, the
proxy reference is set to null
Policy object, if any,
with an AggregatePolicyProvider.
create in interface ServiceDescriptorconfig - The Configuration object
used to configure the creation of the returned object.
Created instance with the service's proxy and implementation
references.
Exception - Thrown if there was any problem
creating the object.public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||