|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.boot.RioServiceDescriptor
org.rioproject.boot.RioActivatableServiceDescriptor
public class RioActivatableServiceDescriptor
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:
RioActivatableServiceDescriptor
supports the following configuration entries, with component
org.rioproject.boot:
| • |
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
ActivationID.activate(boolean) 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 java.rmi.activation.ActivationSystem when there is a
problem creating a service. |
org.rioproject.boot. 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 |
RioActivatableServiceDescriptor.Created
Object returned by RioActivatableServiceDescriptor.create() method that returns the proxy,
group identifier, and activation identifier for the created service. |
| Constructor Summary | |
|---|---|
RioActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart)
Create a RioActivatableServiceDescriptor, calling the other overloaded constructor with the host and port parameters set
to null and 0, respectively. |
|
RioActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart,
String host,
int port)
Create a RioActivatableServiceDescriptor, assigning given parameters to their associated, internal fields. |
|
| 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 org.rioproject.boot.RioServiceDescriptor |
|---|
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 RioActivatableServiceDescriptor(String codebase,
String policy,
String classpath,
String implClassName,
String sharedGroupLog,
String[] serverConfigArgs,
boolean restart)
host and port parameters set
to null and 0, respectively.
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 classsharedGroupLog - The name of the logserverConfigArgs - service configuration argumentsrestart - boolean flag passed through as the restart
parameter to the
ActivationDesc constructor used to register the service with the
activation system.
public RioActivatableServiceDescriptor(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 classsharedGroupLog - The name of the logserverConfigArgs - 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
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 RioServiceDescriptororg.rioproject.boot.RioActivatableServiceDescriptor.Created
object that contains the group identifier, activation ID, and
proxy associated with the newly created service instance.
ExceptionServiceDescriptor.create(net.jini.config.Configuration)public String toString()
toString in class RioServiceDescriptor
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||