org.apache.commons.ssl.rmi
Class Test

java.lang.Object
  extended byorg.apache.commons.ssl.rmi.Test

public class Test
extends java.lang.Object

Since:
22-Feb-2007
Author:
Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com

Field Summary
protected static int PORT
           
protected static java.lang.String URL
           
 
Constructor Summary
Test()
           
 
Method Summary
static java.lang.Object lookup(java.lang.String ref)
          

JNDI/RMI lookup wrapper.

static void main(java.lang.String[] args)
           
static void rebind(java.lang.String ref, java.rmi.Remote obj)
          

JNDI/RMI rebind wrapper for the UCS.

static void tryToStartNameServer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

protected static final int PORT

URL

protected static final java.lang.String URL
Constructor Detail

Test

public Test()
Method Detail

lookup

public static java.lang.Object lookup(java.lang.String ref)
                               throws java.rmi.RemoteException,
                                      java.rmi.NotBoundException,
                                      java.net.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:
java.rmi.RemoteException - rmi problem
java.rmi.NotBoundException - rmi problem
java.net.MalformedURLException - rmi problem

rebind

public static void rebind(java.lang.String ref,
                          java.rmi.Remote obj)
                   throws java.rmi.RemoteException,
                          java.net.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:
java.rmi.RemoteException - rmi problem
java.net.MalformedURLException - rmi problem

tryToStartNameServer

public static void tryToStartNameServer()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011. All Rights Reserved.