org.exolab.jms.net.orb
Interface ORB

All Known Implementing Classes:
AbstractORB

public interface ORB

The ORB enables objects to be distributed.

Version:
$Revision: 1.5 $ $Date: 2005/05/27 14:04:01 $
Author:
Tim Anderson

Field Summary
static java.lang.String PROVIDER_URI
          Constant that holds the name of the connection property for specifying the ORB provider URI.
static java.lang.String SECURITY_CREDENTIALS
          Constant that holds the name of the connection property for specifying the credentials of the principal for authenticating the caller to the ORB.
static java.lang.String SECURITY_PRINCIPAL
          Constant that holds the name of the connection property for specifying the identity of the principal for authenticating the caller to the ORB.
 
Method Summary
 void addCallerListener(java.lang.String uri, CallerListener listener)
          Register a caller event listener.
 void addRoute(java.lang.String uri, java.lang.String toURI)
          Add a route for exported objects.
 Proxy exportObject(java.lang.Object object)
          Export an object on the default URI.
 Proxy exportObject(java.lang.Object object, java.rmi.server.ObjID objID)
          Export an object with a well known identifier on the default URI.
 Proxy exportObject(java.lang.Object object, java.rmi.server.ObjID objID, java.lang.String uri)
          Export an object with a well known identifier on a specific URI.
 Proxy exportObject(java.lang.Object object, java.lang.String uri)
          Export an object on a specific URI.
 Proxy exportObjectTo(java.lang.Object object)
          Export an object to the current remote caller.
 Proxy exportObjectTo(java.lang.Object object, java.lang.String uri)
          Export an object to a specific URI.
 Proxy exportObjectTo(java.lang.Object object, java.lang.String uri, java.lang.String principal, java.lang.String credentials)
          Export an object to a specific URI.
 Caller getCaller()
          Returns the current caller.
 LocalRegistry getRegistry()
          Returns a reference to the registry service.
 Registry getRegistry(java.util.Map properties)
          Returns a reference to a remote registry service.
 void removeCallerListener(java.lang.String uri, CallerListener listener)
          Deregister a caller event listener.
 void shutdown()
          Shuts down the ORB.
 void unexportObject(java.lang.Object object)
          Unexport an object.
 

Field Detail

PROVIDER_URI

public static final java.lang.String PROVIDER_URI
Constant that holds the name of the connection property for specifying the ORB provider URI.

SECURITY_PRINCIPAL

public static final java.lang.String SECURITY_PRINCIPAL
Constant that holds the name of the connection property for specifying the identity of the principal for authenticating the caller to the ORB. The format of the principal depends on the authentication scheme.

SECURITY_CREDENTIALS

public static final java.lang.String SECURITY_CREDENTIALS
Constant that holds the name of the connection property for specifying the credentials of the principal for authenticating the caller to the ORB. The value of the property depends on the authentication scheme.
Method Detail

addRoute

public void addRoute(java.lang.String uri,
                     java.lang.String toURI)
              throws java.rmi.RemoteException
Add a route for exported objects.
Parameters:
uri - the URI to route
toURI - the URI to route to
Throws:
java.rmi.RemoteException - for any error

getRegistry

public LocalRegistry getRegistry()
                          throws java.rmi.RemoteException
Returns a reference to the registry service.
Returns:
the registry service
Throws:
java.rmi.RemoteException - if the service cannot be exported

getRegistry

public Registry getRegistry(java.util.Map properties)
                     throws java.rmi.RemoteException
Returns a reference to a remote registry service.
Parameters:
properties - the connection properties. May be null.
Returns:
the registry service
Throws:
java.rmi.RemoteException - for any error

exportObject

public Proxy exportObject(java.lang.Object object)
                   throws java.rmi.server.ExportException,
                          java.rmi.StubNotFoundException
Export an object on the default URI.
Parameters:
object - the object to export
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObject

public Proxy exportObject(java.lang.Object object,
                          java.lang.String uri)
                   throws java.rmi.server.ExportException,
                          java.rmi.StubNotFoundException
Export an object on a specific URI.
Parameters:
object - the object to export
uri - the URI via which connections to the object are made. If null, the default URI is used.
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObject

public Proxy exportObject(java.lang.Object object,
                          java.rmi.server.ObjID objID)
                   throws java.rmi.server.ExportException,
                          java.rmi.StubNotFoundException
Export an object with a well known identifier on the default URI.
Parameters:
object - the object to export
objID - the well known object identifier
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObject

public Proxy exportObject(java.lang.Object object,
                          java.rmi.server.ObjID objID,
                          java.lang.String uri)
                   throws java.rmi.server.ExportException,
                          java.rmi.StubNotFoundException
Export an object with a well known identifier on a specific URI.
Parameters:
object - the object to export
objID - the well known object identifier
uri - the URI via which connections to the object are made
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObjectTo

public Proxy exportObjectTo(java.lang.Object object)
                     throws java.rmi.server.ExportException,
                            java.rmi.StubNotFoundException
Export an object to the current remote caller. Only the remote caller may perform invocations.
Parameters:
object - the object to export
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObjectTo

public Proxy exportObjectTo(java.lang.Object object,
                            java.lang.String uri)
                     throws java.rmi.server.ExportException,
                            java.rmi.StubNotFoundException
Export an object to a specific URI. Only callers from the target URI may perform invocations.
Parameters:
object - the object to export
uri - the target URI from which connections to the object are made.
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

exportObjectTo

public Proxy exportObjectTo(java.lang.Object object,
                            java.lang.String uri,
                            java.lang.String principal,
                            java.lang.String credentials)
                     throws java.rmi.server.ExportException,
                            java.rmi.StubNotFoundException
Export an object to a specific URI. Only callers from the target URI may perform invocations.
Parameters:
object - the object to export
uri - the target URI from which connections to the object are made.
principal - the security principal. May be null
credentials - the security credentials. May be null
Returns:
a proxy which may be used to invoke methods on the object
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

unexportObject

public void unexportObject(java.lang.Object object)
                    throws java.rmi.NoSuchObjectException
Unexport an object.
Parameters:
object - the object to export
Throws:
java.rmi.NoSuchObjectException - if the object isn't exported

getCaller

public Caller getCaller()
                 throws java.rmi.RemoteException
Returns the current caller.
Returns:
the current caller, or null if no call is in progress
Throws:
java.rmi.RemoteException - for any error

addCallerListener

public void addCallerListener(java.lang.String uri,
                              CallerListener listener)
                       throws java.rmi.RemoteException
Register a caller event listener.
Parameters:
uri - the remote URI to listen on
listener - the listener to notify
Throws:
java.rmi.RemoteException - for any error

removeCallerListener

public void removeCallerListener(java.lang.String uri,
                                 CallerListener listener)
                          throws java.rmi.RemoteException
Deregister a caller event listener.
Parameters:
uri - the remote URI the listener is listening for events on
listener - the listener to remove
Throws:
java.rmi.RemoteException - for any error

shutdown

public void shutdown()
              throws java.rmi.RemoteException
Shuts down the ORB.
Throws:
java.rmi.RemoteException - for any error


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.