org.exolab.jms.net.orb
Class UnicastObject

java.lang.Object
  |
  +--org.exolab.jms.net.orb.UnicastObject

public abstract class UnicastObject
extends java.lang.Object

UnicastObject is a convenience class which may be sublassed from in order to provide remoting of behaviour.

Version:
$Revision: 1.2 $ $Date: 2005/05/27 13:44:45 $
Author:
Tim Anderson

Constructor Summary
protected UnicastObject(ORB orb)
          Construct a new UnicastObject.
protected UnicastObject(ORB orb, java.lang.String uri)
          Construct a new UnicastObject.
protected UnicastObject(ORB orb, java.lang.String uri, boolean exportTo)
          Construct a new UnicastObject.
 
Method Summary
protected  ORB getORB()
          Returns the ORB.
 Proxy getProxy()
          Returns a proxy to invoke methods on this.
protected  java.lang.String getURI()
          Returns the URI this was exported on.
 void unexportObject()
          Unexport this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicastObject

protected UnicastObject(ORB orb)
                 throws java.rmi.server.ExportException,
                        java.rmi.StubNotFoundException
Construct a new UnicastObject.
Parameters:
orb - the ORB to export this with
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

UnicastObject

protected UnicastObject(ORB orb,
                        java.lang.String uri)
                 throws java.rmi.server.ExportException,
                        java.rmi.StubNotFoundException
Construct a new UnicastObject.
Parameters:
orb - the ORB to export this with
uri - the URI to export this on. If null, use the ORB default export URI
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found

UnicastObject

protected UnicastObject(ORB orb,
                        java.lang.String uri,
                        boolean exportTo)
                 throws java.rmi.server.ExportException,
                        java.rmi.StubNotFoundException
Construct a new UnicastObject.
Parameters:
orb - the ORB to export this with
uri - the URI to export this on
exportTo - if false, ORB.exportObject(Object, String) is used to export this. If true and uri is non-null, ORB.exportObjectTo(Object, String) is used, otherwise ORB.exportObjectTo(Object) is used.
Throws:
java.rmi.server.ExportException - if the object cannot be exported
java.rmi.StubNotFoundException - if the proxy class cannot be found
Method Detail

getProxy

public Proxy getProxy()
Returns a proxy to invoke methods on this.
Returns:
a proxy to invoke methods on this

unexportObject

public void unexportObject()
                    throws java.rmi.NoSuchObjectException
Unexport this object.
Throws:
java.rmi.NoSuchObjectException - if the object isn't exported

getORB

protected ORB getORB()
Returns the ORB.
Returns:
the ORB

getURI

protected java.lang.String getURI()
Returns the URI this was exported on.
Returns:
the URI this was exported on, or null if the ORB default URI was used.


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