public class Test extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
PORT |
protected static String |
URL |
| Constructor and Description |
|---|
Test() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
lookup(String ref)
JNDI/RMI lookup wrapper.
|
static void |
main(String[] args) |
static void |
rebind(String ref,
Remote obj)
JNDI/RMI rebind wrapper for the UCS.
|
static void |
tryToStartNameServer() |
protected static final int PORT
protected static final String URL
public static Object lookup(String ref) throws RemoteException, NotBoundException, MalformedURLException
ref - String reference.RemoteException - rmi problemNotBoundException - rmi problemMalformedURLException - rmi problempublic static void rebind(String ref, Remote obj) throws RemoteException, MalformedURLException
Also attempts to start a naming server on the localhost if one is not already running. Currently we use RMI.
ref - String reference to bind with.obj - Object to bind.RemoteException - rmi problemMalformedURLException - rmi problempublic static void tryToStartNameServer()
Copyright © 2019. All rights reserved.