ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/CorbaClientListenerServant.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/CorbaClientListenerServant.java (file contents):
Revision 1.2 by tdb, Sat Feb 3 04:44:09 2001 UTC vs.
Revision 1.7 by tdb, Tue Mar 13 18:37:08 2001 UTC

# Line 9 | Line 9 | import uk.ac.ukc.iscream.client.*;
9  
10   /**
11   * This class, a servant, listens for incoming connections from CORBA based
12 < * clients. Once it receives a connection it creates and assigns a CorbaHandler
13 < * object to it. The CorbaHandler will then handle all requests on behalf of the
12 > * clients. Once it receives a connection it creates and assigns a CorbaControlHandler
13 > * object to it. The CorbaControlHandler will then handle all requests on behalf of the
14   * client, and will send the client data.
15   *
16   * @author  $Author$
# Line 44 | Line 44 | class CorbaClientListenerServant extends CorbaClientLi
44      /**
45       * Allows a CORBA client to connect to the server.
46       *
47     * @param name the name of the connecting client.
47       * @param client a reference to the "servant" part of the connecting client.
48 <     * @return a CorbaHandler reference.
48 >     * @param name a name to identify the client.
49 >     * @return a CorbaControlHandler reference.
50       */
51 <    public CorbaHandler connect(String name, Client client) {
52 <        CorbaHandlerServant chServant = new CorbaHandlerServant(_packetSorter, name, client);
53 <        CorbaHandlerPOATie chPOATie = new CorbaHandlerPOATie(chServant);
51 >    public CorbaControlHandler connect(Client client, String name) {
52 >        CorbaControlHandlerServant cchServant = new CorbaControlHandlerServant(_packetSorter, client, name);
53          org.omg.CORBA.Object objRef;
54          try {
55 <            objRef = _refman.getRootPOA().servant_to_reference(chPOATie);
55 >            objRef = _refman.getRootPOA().servant_to_reference(cchServant);
56          } catch (Exception e) {
57              objRef = null;
58 <            _logger.write(toString(), Logger.ERROR, "Error creating CorbaHandler: "+e);
58 >            _logger.write(toString(), Logger.ERROR, "Error creating CorbaControlHandler: "+e);
59          }
60 <        CorbaHandler corbaHandler = CorbaHandlerHelper.narrow(objRef);
62 <        corbaHandler.start();
60 >        CorbaControlHandler corbaHandler = CorbaControlHandlerHelper.narrow(objRef);
61          return corbaHandler;
62      }
63      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines