uk.org.iscream.cms.server.rootfilter
Class CorbaControlHandlerServant

java.lang.Object
  extended byorg.omg.PortableServer.Servant
      extended byuk.org.iscream.cms.server.clientinterface.CorbaControlHandlerPOA
          extended byuk.org.iscream.cms.server.rootfilter.CorbaControlHandlerServant
All Implemented Interfaces:
CorbaControlHandlerOperations, InvokeHandler

class CorbaControlHandlerServant
extends CorbaControlHandlerPOA

Acts as a Control Handler to a CORBA based client.

Version:
$Id: CorbaControlHandlerServant.java,v 1.2 2004/08/01 10:41:06 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  Client _client
          The "servant" part of the client we're connected to.
private  String _clientname
          A name to identify the client
private  CorbaDataHandler _dataHandler
          A reference to our DataHandler, if we have one
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  String _name
          This is the friendly identifier of the component this class is running in.
private  Queue _queue
          A reference to our Queue.
private  ReferenceManager _refman
          A reference to the reference manager in use
 String REVISION
          The current CVS revision of this class
 
Fields inherited from class uk.org.iscream.cms.server.clientinterface.CorbaControlHandlerPOA
 
Fields inherited from class org.omg.PortableServer.Servant
 
Constructor Summary
CorbaControlHandlerServant(Queue queue, Client client, String clientname)
          Construct a new CorbaControlHandlerServant.
 
Method Summary
 void disconnect()
          Disconnect, this will shutdown the data and unhook from the CORBA ORB.
protected  void finalize()
          Overridden for debugging purposes to see when an instance of this class is destroyed
 boolean setHostList(String hostList)
          Sets the host list for the Client to the requested semi-colon separated list of hostnames.
 boolean startData()
          Start sending data to the client.
 boolean stopData()
          Stop sending data to the client.
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class uk.org.iscream.cms.server.clientinterface.CorbaControlHandlerPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.


_logger

private Logger _logger
This holds a reference to the system logger that is being used.


_refman

private ReferenceManager _refman
A reference to the reference manager in use


_queue

private Queue _queue
A reference to our Queue.


_client

private Client _client
The "servant" part of the client we're connected to.


_dataHandler

private CorbaDataHandler _dataHandler
A reference to our DataHandler, if we have one


_clientname

private String _clientname
A name to identify the client

Constructor Detail

CorbaControlHandlerServant

public CorbaControlHandlerServant(Queue queue,
                                  Client client,
                                  String clientname)
Construct a new CorbaControlHandlerServant.

Parameters:
queue - A reference to the Queue we're using
client - A reference to the "servant" part of the connecting client.
clientname - A name to identify the client.
Method Detail

startData

public boolean startData()
Start sending data to the client.

Returns:
a boolean stating whether the attempt to start succeeded

stopData

public boolean stopData()
Stop sending data to the client.

Returns:
a boolean stating whether the attempt to stop succeeded

setHostList

public boolean setHostList(String hostList)
Sets the host list for the Client to the requested semi-colon separated list of hostnames. This will only succeed if we are not sending data.

Parameters:
hostList - A semi-colon separated list of hostnames to use.
Returns:
Whether the request succeeded.

disconnect

public void disconnect()
Disconnect, this will shutdown the data and unhook from the CORBA ORB.


toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.NameFormat class to format the toString()

Returns:
the name of this class and its CVS revision

finalize

protected void finalize()
                 throws Throwable
Overridden for debugging purposes to see when an instance of this class is destroyed

Throws:
Throwable


Copyright © 2000-2003 i-scream. All Rights Reserved.