org.apache.commons.ssl.rmi
Class Test
java.lang.Object
org.apache.commons.ssl.rmi.Test
public class Test
- extends Object
- Since:
- 22-Feb-2007
- Author:
- Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com
Constructor Summary |
Test()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final LogWrapper log
TEST_DATE_NAME
private static final String TEST_DATE_NAME
- See Also:
- Constant Field Values
TEST_INT_NAME
private static final String TEST_INT_NAME
- See Also:
- Constant Field Values
PORT
protected static final int PORT
URL
protected static final String URL
rmiRunning
private static boolean rmiRunning
Test
public Test()
lookup
public static Object lookup(String ref)
throws RemoteException,
NotBoundException,
MalformedURLException
-
JNDI/RMI lookup wrapper. Appends "java:" if we expect
binding/lookup to occur in the same JVM. Otherwise, appends "rmi:".
- Parameters:
ref
- String reference.
- Returns:
- Object Object previously bound with String reference.
- Throws:
RemoteException
- rmi problem
NotBoundException
- rmi problem
MalformedURLException
- rmi problem
rebind
public static void rebind(String ref,
Remote obj)
throws RemoteException,
MalformedURLException
-
JNDI/RMI rebind wrapper for the UCS. Appends "java:" if we expect
binding/lookup to occur in the same JVM. Otherwise, append "rmi:".
Also attempts to start a naming server on the localhost if one is
not already running. Currently we use RMI.
- Parameters:
ref
- String reference to bind with.obj
- Object to bind.
- Throws:
RemoteException
- rmi problem
MalformedURLException
- rmi problem
rebindTest
private static void rebindTest()
throws Exception
- Throws:
Exception
requireNameServer
private static void requireNameServer()
-
Attempts to start a naming server on the localhost if one is not
already running.
tryToStartNameServer
public static void tryToStartNameServer()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception