Interface horb.orb.Proxy
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface horb.orb.Proxy

public interface Proxy
extends Object
Proxy object interface. Any proxy object has these methods. Proxy methods may throws HORBException.

Method Index

 o _available()
return true if the previously issued asynchronous method call has completed.
 o _connect(HorbURL, String, String)
connect this proxy to an object that is designated by objectURL with given username and password.
 o _getIOCI()
Returns IOCI object.
 o _getMajorVersion()
Returns major version number of this proxy class.
 o _getMinorVersion()
Returns minor version number of this proxy class.
 o _getObjectURL()
Returns URL of the remote object.
 o _getThreadName()
Returns thread name of the remote HORB thread.
 o _invite(HorbURL, String, String)
invite a server object to connect to an object (invitor).
 o _invited(IOCI, HorbURL, String, String)
(Internal) setup connection to invited path.
 o _recvInstance(IOCI, Object, boolean, Goldberg, byte)
(Internal) Receives an object of this type and returns the object.
 o _release()
Releases the connection to the remote object.
 o _sendInstance(IOCI, Object, Loopy, byte)
(Internal) Sends an object 'o' that is this type, to ioci.
 o _setHandler(AsyncMethodHandler, int)
Set asynchronous method call handler.
 o _setIOCI(IOCI)
Set new IOCI object.
 o _wait(long)
wait for completion of the previously issued asynchronous method call.

Methods

 o _getMajorVersion
  public abstract short _getMajorVersion()
Returns major version number of this proxy class.
 o _getMinorVersion
  public abstract short _getMinorVersion()
Returns minor version number of this proxy class.
 o _getIOCI
  public abstract IOCI _getIOCI()
Returns IOCI object.
 o _setIOCI
  public abstract void _setIOCI(IOCI ioci)
Set new IOCI object.
 o _getObjectURL
  public abstract HorbURL _getObjectURL()
Returns URL of the remote object.
 o _getThreadName
  public abstract String _getThreadName()
Returns thread name of the remote HORB thread.
 o _connect
  public abstract void _connect(HorbURL objectURL,
                                String username,
                                String passwd) throws HORBException, NetException
connect this proxy to an object that is designated by objectURL with given username and password. This method can be used to use arbitrary IOCI implementation.
   Server_Proxy server = new Server_Proxy(url, username, password);
is equivalent to;
   Server_Proxy server = new Server_Proxy();
   IOCI ioci = new BasicIOCI();
   server._setIOCI(ioci);
   server._connect(url, username, password);
Parameters:
objectURL - Object URL to be connected.
username - username.
passwd - password.
Throws: HORBException
object not found in remote system, or can't create IOCI
Throws: NetException
Network error
 o _release
  public abstract void _release()
Releases the connection to the remote object. This proxy object becomes no longer usable.
 o _invite
  public abstract void _invite(HorbURL clientURL,
                               String username,
                               String passwd) throws HORBException, NetException
invite a server object to connect to an object (invitor). If the server calls accept() method of the corresponding skeleton object, the server object can call methods of the object. See examples/invitation. Username should be a valid username for inviting client object, or null.
Parameters:
clientURL - invitor's URL
username - username to use the clientURL. If null, the username used when connecting to the server object is userd. Username is needed to protect the client system against the server system because the remote server can be a fake.
passwd - password of the username. Null means anonymous password. Password is needed to protect the client system against the server system because the remote server can be a fake.
Throws: NetException
Network error
 o _invited
  public abstract void _invited(IOCI ioci,
                                HorbURL clientURL,
                                String username,
                                String passwd) throws HORBException, IOException
(Internal) setup connection to invited path. Don't call this method from user's program.
 o _available
  public abstract boolean _available()
return true if the previously issued asynchronous method call has completed.
  remote.method_Request();		// issue method request
  do {
      // another work
  } while (remote._available() == false);
  answer = remote.method_Receive(); // get answer
 o _wait
  public abstract boolean _wait(long timeout) throws InterruptedException
wait for completion of the previously issued asynchronous method call.
Parameters:
timeout - milli seconds for timeout.
Returns:
true if the method call completed until timeout. returns false if timeout.
 o _setHandler
  public abstract void _setHandler(AsyncMethodHandler handler,
                                   int tag)
Set asynchronous method call handler. Once a handler is set, the handler is called with tag when asynchronous method call completes.
Parameters:
handler - handler to be called.
tag - arbitrary integer number.
See Also:
AsyncMethodHandler
 o _sendInstance
  public abstract void _sendInstance(IOCI ioci,
                                     Object o,
                                     Loopy loopy,
                                     byte place) throws HORBException, IOException
(Internal) Sends an object 'o' that is this type, to ioci. Don't call from user's program. This is a static method actually.
Parameters:
ioci - ioci object
o - if superclass object to be filled, otherwise null.
loopy - loop checker.
place - source/destination of object passing.
Throws: HORBException
Exception occures during sending the instance.
Throws: IOException
Failure of socket connection
 o _recvInstance
  public abstract Object _recvInstance(IOCI ioci,
                                       Object o,
                                       boolean superclass,
                                       Goldberg gb,
                                       byte place) throws HORBException, IOException
(Internal) Receives an object of this type and returns the object. Don't call this user's program. This is a static method actually.
Parameters:
ioci - ioci object
o - if superclass object to be filled, otherwise null
superclass - true if it is a superclass
Goldberg - another side of loop checker.
place - source/destination of object passing.
Throws: HORBException
Exception occures during receiving the instance
Throws: IOException
Failure of socket connection

All Packages  Class Hierarchy  This Package  Previous  Next  Index