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.3 by tdb, Sat Feb 3 04:47:49 2001 UTC vs.
Revision 1.10 by tdb, Sat May 18 18:16:00 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (at your option) any later version.
9 + *
10 + * This program is distributed in the hope that it will be useful,
11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 + * GNU General Public License for more details.
14 + *
15 + * You should have received a copy of the GNU General Public License
16 + * along with this program; if not, write to the Free Software
17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   //---PACKAGE DECLARATION---
21 < package uk.ac.ukc.iscream.clientinterface;
21 > package uk.org.iscream.cms.server.clientinterface;
22  
23   //---IMPORTS---
24 < import uk.ac.ukc.iscream.core.*;
25 < import uk.ac.ukc.iscream.util.*;
26 < import uk.ac.ukc.iscream.componentmanager.*;
27 < import uk.ac.ukc.iscream.client.*;
24 > import uk.org.iscream.cms.server.core.*;
25 > import uk.org.iscream.cms.server.util.*;
26 > import uk.org.iscream.cms.server.componentmanager.*;
27 > import uk.org.iscream.cms.server.client.*;
28  
29   /**
30   * This class, a servant, listens for incoming connections from CORBA based
31 < * clients. Once it receives a connection it creates and assigns a CorbaHandler
32 < * object to it. The CorbaHandler will then handle all requests on behalf of the
31 > * clients. Once it receives a connection it creates and assigns a CorbaControlHandler
32 > * object to it. The CorbaControlHandler will then handle all requests on behalf of the
33   * client, and will send the client data.
34   *
35   * @author  $Author$
# Line 44 | Line 63 | class CorbaClientListenerServant extends CorbaClientLi
63      /**
64       * Allows a CORBA client to connect to the server.
65       *
47     * @param name the name of the connecting client.
66       * @param client a reference to the "servant" part of the connecting client.
67 <     * @return a CorbaHandler reference.
67 >     * @param name a name to identify the client.
68 >     * @return a CorbaControlHandler reference.
69       */
70 <    public CorbaHandler connect(String name, Client client) {
71 <        CorbaHandlerServant chServant = new CorbaHandlerServant(_packetSorter, name, client);
53 <        CorbaHandlerPOATie chPOATie = new CorbaHandlerPOATie(chServant);
70 >    public CorbaControlHandler connect(Client client, String name) {
71 >        CorbaControlHandlerServant cchServant = new CorbaControlHandlerServant(_packetSorter, client, name);
72          org.omg.CORBA.Object objRef;
73          try {
74 <            objRef = _refman.getRootPOA().servant_to_reference(chPOATie);
74 >            objRef = _refman.getRootPOA().servant_to_reference(cchServant);
75          } catch (Exception e) {
76              objRef = null;
77 <            _logger.write(toString(), Logger.ERROR, "Error creating CorbaHandler: "+e);
77 >            _logger.write(toString(), Logger.ERROR, "Error creating CorbaControlHandler: "+e);
78          }
79 <        CorbaHandler corbaHandler = CorbaHandlerHelper.narrow(objRef);
62 <        ((Thread) corbaHandler).start();
79 >        CorbaControlHandler corbaHandler = CorbaControlHandlerHelper.narrow(objRef);
80          return corbaHandler;
81      }
82      
# Line 67 | Line 84 | class CorbaClientListenerServant extends CorbaClientLi
84       * Overrides the {@link java.lang.Object#toString() Object.toString()}
85       * method to provide clean logging (every class should have this).
86       *
87 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
87 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
88       * to format the toString()
89       *
90       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines