|
JTR 5.0 API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjtr.remote.utils.RmiUtil
public class RmiUtil
This class provides utility methods for managing the registry service and for registering new services to it.
| Constructor Summary | |
|---|---|
RmiUtil()
|
|
| Method Summary | |
|---|---|
static java.rmi.registry.Registry |
launchRegistry(java.lang.String host,
int port)
Launches the registry on the given host and on the given port. Note: the registry can only be started on the localhost. |
static void |
logRegistryContent(java.rmi.registry.Registry r)
This method logs the content of the registry. |
static java.rmi.Remote |
lookupServer(NodeInfo jtrNode)
Utility method for performing server look-up. |
static java.rmi.Remote |
registerService(java.rmi.registry.Registry r,
java.lang.Class<? extends java.rmi.Remote> service,
java.lang.String serviceName)
This method looks-up/registers a service on the registry. |
static void |
setSystemProperties()
This method sets all the properties required by the JTR distributed-runtime to work propertly. In more detail this methods looks for the java.rmi.server.hostname
and, if not defined, it is set to be equal to the value of the
jtr.remote.test.host property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RmiUtil()
| Method Detail |
|---|
public static final java.rmi.registry.Registry launchRegistry(java.lang.String host,
int port)
host - The host name the registry is running onport - The port the registry is attached to
RmiUtilException - Thrown if unable to lauch the registry
public static final java.rmi.Remote registerService(java.rmi.registry.Registry r,
java.lang.Class<? extends java.rmi.Remote> service,
java.lang.String serviceName)
r - The registryservice - The service definitionserviceName - The name under which the service must be registered
null in case of error
public static java.rmi.Remote lookupServer(NodeInfo jtrNode)
throws LocatorException
jtrNode -
LocatorExceptionpublic static final void logRegistryContent(java.rmi.registry.Registry r)
r - The registrypublic static final void setSystemProperties()
java.rmi.server.hostname
and, if not defined, it is set to be equal to the value of the
jtr.remote.test.host property.
|
The JTR Project is licensed under GPL version 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||