|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jini.fiddler.StartFiddler
Inner Class Summary | |
static class |
StartFiddler.Created
Static class that acts as a data structure for holding the multiple return values from the create methods. |
Method Summary | |
static LookupDiscoveryService |
create(java.rmi.activation.ActivationGroupID gid,
java.lang.String logDirname,
java.lang.String[] groups,
LookupLocator[] locators)
This method creates an activatable instance of the Fiddler implementation of the lookupdiscovery service and returns a proxy that provides client-side access to that instance. |
static StartFiddler.Created |
create(java.lang.String classpath,
java.lang.String codebase,
java.lang.String policy,
java.lang.String logdir)
This method creates an activatable instance of the Fiddler implementation of the lookupdiscovery service and returns a proxy that provides client-side access to that instance. |
static StartFiddler.Created |
create(java.lang.String classpath,
java.lang.String codebase,
java.lang.String policy,
java.lang.String logdir,
java.lang.String[] groups,
LookupLocator[] locators,
java.util.Properties props,
java.lang.String cmdpath,
java.lang.String[] argv)
This method creates an activatable instance of the Fiddler implementation of the lookupdiscovery service and returns a proxy that provides client-side access to that instance. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static void main(java.lang.String[] args)
public static LookupDiscoveryService create(java.rmi.activation.ActivationGroupID gid, java.lang.String logDirname, java.lang.String[] groups, LookupLocator[] locators) throws java.rmi.activation.ActivationException, java.io.IOException
If no group names are entered on the command line, then the default action that the lookup discovery service takes with respect to groups is to join the un-named public group ("").
Note that when the lookup discovery service is destroyed (through
the com.sun.jini.admin.DestroyAdmin
interface provided
by the Fiddler
implementation), it will also destroy
its activation group, regardless of whether or not there are other
activatable objects still registered in the same group. This is due
to the following reason:
When the
Because the activation group that is created and registered with the
activation system is useful only to entities that have the same
import and export codebases as those registered with the group,
(and because such entities wishing to register with that activation
group would also have to obtain the activation group ID from the
service registered by this class), it is not expected that when
the service is destroyed through the ActivationDesc
is created below, the
location
parameter to the constructor is not set.
If it were to be set, then both the import codebase (the classpath)
and the export codebase of this class would be the same; that is,
the activation system would use that location to retrieve classes
when activating the server-side, and would also annotate with that
location all remote classes that are downloaded to the client-side.
Since this class wishes to distinguish the import codebase from the
export codebase, it must communicate each codebase's value to the
activation system through a different mechanism than the
location
parameter of the constructor of
ActivationDesc
. That alternate mechanism consists
of creating an activation group descriptor
(ActivationGroupDesc
) in which the properties are
over-ridden to include the desired import codebase as the new
classpath property ("-cp java.rmi.server.codebase
property.
This class' activation descriptor (ActivationDesc
) is
the created using the same group ID (ActivationGroupID
)
as that generated by the creation of the activation group descriptor
with the desired import and export codebases.
DestroyAdmin
that
any other entities will be registered in the activation group. Being
the only entity registered in the activation group means that when
it is destroyed, it is also the last entity registered in the group.
Thus, upon destroying the service, the activation group created here
is also ultimately unregistered (removed) from the activation system
because once that service is destroyed, there is no way to access
the activation group ID for future registrations (or even for
destroying).
gid
- ID of the activation group to uselogDirname
- directory in which the state of the lookup discovery
service will be recorded for persistencegroups
- String
array containing the names of
the groups whose members are the lookup services that
should be discovered and joinedlocators
- String array containing the names of the hosts
running the specific lookup services to discover
and join (these host names will eventually be used
to build corresponding instances of the class
net.jini.core.discovery.LookupLocator)
public static StartFiddler.Created create(java.lang.String classpath, java.lang.String codebase, java.lang.String policy, java.lang.String logdir) throws java.rmi.activation.ActivationException, java.io.IOException
The lookup discovery service is initially a member of no groups.
Note that when the lookup discovery service is destroyed (through the com.sun.jini.admin.DestroyAdmin interface provided by the Fiddler implementation), it will also destroy its activation group, regardless of whether or not there are other activatable objects still registered in the same group.
classpath
- classpath for the lookup discovery servicecodebase
- codebase for the lookup discovery servicepolicy
- the lookup discovery service's security policy filelogdir
- directory in which the lookup discovery service's
state will be recorded for persistencepublic static StartFiddler.Created create(java.lang.String classpath, java.lang.String codebase, java.lang.String policy, java.lang.String logdir, java.lang.String[] groups, LookupLocator[] locators, java.util.Properties props, java.lang.String cmdpath, java.lang.String[] argv) throws java.rmi.activation.ActivationException, java.io.IOException
The lookup discovery service is initially a member of no groups.
Note that when the lookup discovery service is destroyed (through the com.sun.jini.admin.DestroyAdmin interface provided by the Fiddler implementation), it will also destroy its activation group, regardless of whether or not there are other activatable objects still registered in the same group.
classpath
- classpath for the lookup discovery servicecodebase
- codebase for the lookup discovery servicepolicy
- the lookup discovery service's security policy filelogdir
- directory in which the lookup discovery service's
state will be recorded for persistencegroups
- String array containing the names of the groups
whose members are the lookup services that should
be discovered and joinedlocators
- String array containing the names of the hosts
running the specific lookup services to discover
and join (these host names will eventually be used
to build corresponding instances of the class
net.jini.core.discovery.LookupLocator)props
- properties for the activation group, or nullcmdpath
- command program for the activation group, or nullargv
- command options for the activation group, or null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |