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/CorbaControlHandlerServant.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/CorbaControlHandlerServant.java (file contents):
Revision 1.6 by tdb, Wed Feb 28 19:04:00 2001 UTC vs.
Revision 1.7 by tdb, Tue Mar 13 18:37:08 2001 UTC

# Line 38 | Line 38 | class CorbaControlHandlerServant extends CorbaControlH
38       * @param queueMonitorInterval The interval at which to monitor our Queue.
39       * @param clientname A name to identify the client.
40       */
41 <    public CorbaControlHandlerServant(PacketSorter packetSorter, Client client, int queueMonitorInterval, String clientname) {
41 >    public CorbaControlHandlerServant(PacketSorter packetSorter, Client client, String clientname) {
42          _packetSorter = packetSorter;
43        _queueMonitorInterval = queueMonitorInterval;
43          _hostList = "";
44          _client = client;
45          _clientname = clientname;
# Line 61 | Line 60 | class CorbaControlHandlerServant extends CorbaControlH
60              CorbaDataHandler dh = new CorbaDataHandler(_client);
61              // register the Queue
62              _packetSorter.register(dh.getQueue(), _hostList);
63 <            // startup a monitor on the DataHandler's queue, every minute
64 <            String queueName = _name + " CorbaHandler:"+_clientname;
65 <            dh.getQueue().startMonitor(_queueMonitorInterval*1000, _packetSorter.getQueue(), queueName);
63 >            try {
64 >                // startup a monitor on the DataHandler's queue
65 >                ConfigurationProxy cp = ConfigurationProxy.getInstance();
66 >                int queueMonitorInterval = Integer.parseInt(cp.getProperty("ClientInterface", "Queue.MonitorInterval"));
67 >                String queueName = _name + " CorbaHandler:"+_clientname;
68 >                dh.getQueue().startMonitor(queueMonitorInterval*1000, _packetSorter.getQueue(), queueName);
69 >            } catch (PropertyNotFoundException e) {
70 >                _logger.write(toString(), Logger.WARNING, "failed to find queue monitor config, disabling. " + e);
71 >            }
72              // start the DataHandler running
73              dh.start();
74              // keep a reference
# Line 170 | Line 175 | class CorbaControlHandlerServant extends CorbaControlH
175       * A reference to our DataHandler, if we have one
176       */
177      private CorbaDataHandler _dataHandler;
173    
174    /**
175     * The interval at which to monitor our Queue
176     */
177    private int _queueMonitorInterval;
178      
179      /**
180       * A name to identify the client

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines