|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.jini.start.NonActivatableServiceDescriptor
com.sun.jini.start.SharedActivatableServiceDescriptor
Class used to launch shared, activatable services.
Clients construct this object with the details
of the service to be launched, then call create
to launch the service in the activation system group identified by
the sharedGroupLog constructor parameter.
This class depends on ActivateWrapper to provide
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 activation system group, with each object
maintaining a distinct codebase and policy.
Services need to implement the constructor required by
ActivateWrapper.
The following items are discussed below:
SharedActivatableServiceDescriptor supports the
following configuration entries, with component
com.sun.jini.start:
| • |
activationIdPreparer
| |
|---|---|---|
|   | Type: | ProxyPreparer
|
|   | Default: |
new
|
|   | Description: | The proxy preparer for the service's activation
ID. The value should not be null.
This class calls the
activate method on instances of ActivationID when they need to re/activate the
service.
|
| • |
activationSystemPreparer
| |
|---|---|---|
|   | Type: | ProxyPreparer
|
|   | Default: |
new
|
|   | Description: | The proxy preparer for the proxy for the
activation system. The value should not be null.
The service starter calls the unregisterObject method on the ActivationSystem when there is a problem
creating a service.
|
Logger, named
com.sun.jini.start.service.starter.
The following table describes the
type of information logged as well as the levels of information logged.
| Level | Description |
|---|---|
FINER | for high level service operation tracing |
FINEST | for low level service operation tracing |
| Nested Class Summary | |
static class |
SharedActivatableServiceDescriptor.Created
Object returned by SharedActivatableServiceDescriptor.create()
method that returns the proxy, group identifier, and activation identifier
for the created service. |
| Constructor Summary | |
SharedActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart)
Trivial constructor. |
|
SharedActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart,
String host,
int port)
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 |
getActivationSystemHost()
Activation system host accessor method. |
int |
getActivationSystemPort()
Activation system port accessor method. |
boolean |
getRestart()
Restart accessor method. |
String |
getSharedGroupLog()
Shared group log accessor method. |
String |
toString()
|
| Methods inherited from class com.sun.jini.start.NonActivatableServiceDescriptor |
getClasspath, getCodebase, getImplClassName, getLifeCycle, getPolicy, getServerConfigArgs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SharedActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart)
host and port parameters set to
null and 0, respectively.
public SharedActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart,
String host,
int port)
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 argumentsrestart - boolean flag passed through as the
restart parameter to the
ActivationDesc constructor used to register the service with the
activation system.host - hostname of desired activation system. If null,
defaults to the localhost.port - port of desired activation system. If value is <= 0, then
defaults to
ActivationSystem.SYSTEM_PORT.| Method Detail |
public final String getSharedGroupLog()
public final boolean getRestart()
public final String getActivationSystemHost()
public final int getActivationSystemPort()
public Object create(Configuration config)
throws Exception
This method:
ActivateWrapper.ActivateDesc with
the provided constructor parameter information
ActivateWrapper.register() with the provided information.
ActivationID#activate(true) on the object returned from
ActivateWrapper.register(), which also
activates the service instance.
ServiceProxyAccessor.getServiceProxy()
on the "inner" proxy instance.
Otherwise, the "inner"
proxy reference is used in the return value.
create in interface ServiceDescriptorcreate in class NonActivatableServiceDescriptorCreated object that contains the group identifier, activation ID, and
proxy associated with the newly created service instance.
Exceptionpublic String toString()
toString in class NonActivatableServiceDescriptor
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||