Example of invitation. Standalone client version.

(If you need applet version, see examples/invitation2 after this.)

* description

Invitation is a mechanism that enables a server to call methods of a client.

1) At client side, start HORB server in the client without a port server.
   This is done by new HORB(true, -1);
2) At client side, register the client object to the HORB server.
   This is done by HORBServer.registerObject();
3) At client side, create or connect to a server object.
4) At client side, invite the server.
    ((Server_Proxy)server)._invite(clientURL, null, null);
5) At server side, accept the invitation.
    Server_Skeleton skeleton = (Server_Skeleton)HORBServer.getSkeleton();
    Client_Proxy client = (Client_Proxy)skeleton.accept(0);
6) Now the server can call the client's methods.
   client.work()
	
This is convinient when you don't want to accept connect requests at
the client side. For example, applets cannot accept connect requests.

Remember, invitation is expensive since you have to download the
server part of the HORB runtime into a WWW browser. While the client
part of the HORB runtime is only 30KB, but the server part is quite
big. I recommend you to use threads wisely instead of invitation.

* version

Author: HIRANO Satoshi
Versioin: 1.0

* How to compile and run

c:> horbc Server.java Client.java
c:> horbc -c Server_Impl.java 

c:> horb -v             (start a HORB server in another window)
c:> java horb.examples.invitation.Client


* Classes

   Server.java		interface of Server
   Server_Impl.java     implementation of Server
   Client.java		client

