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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterMain.java (file contents):
Revision 1.38 by tdb, Wed Feb 5 16:43:47 2003 UTC vs.
Revision 1.39 by tdb, Mon Feb 24 20:18:49 2003 UTC

# Line 71 | Line 71 | public class FilterMain implements Component {
71          
72          // which input methods do we need to activate?
73          // default to activating them
74        boolean activateTCPReader = true;
74          boolean activateUDPReader = true;
75          boolean activateCORBAReader = true;
76          
78        // check for TCP Reader
79        try {
80            int tcp = Integer.parseInt(cp.getProperty("Filter." + FilterMain.NAME, "Filter.ActivateTCPReader"));
81            activateTCPReader = (tcp == 1);
82        } catch (PropertyNotFoundException e) {
83            activateTCPReader = false;
84        } catch (NumberFormatException e) {
85            activateTCPReader = false;
86        }
77          // check for UDP Reader
78          try {
79              int udp = Integer.parseInt(cp.getProperty("Filter." + FilterMain.NAME, "Filter.ActivateUDPReader"));
# Line 108 | Line 98 | public class FilterMain implements Component {
98          
99          // there's little point starting a Queue and a FilterThread
100          // if nothing is going to be giving us any data
101 <        if(activateTCPReader || activateUDPReader || activateCORBAReader) {
101 >        if(activateUDPReader || activateCORBAReader) {
102              // see if this Queue needs a size limit
103              try {
104                  int queueSizeLimit = Integer.parseInt(cp.getProperty("Filter." + FilterMain.NAME, "Queue.SizeLimit"));
# Line 157 | Line 147 | public class FilterMain implements Component {
147          
148          // the corba listener needs these to be set, so lets
149          // make them something obviously invalid initially
160        int TCPListenPort = -1;
150          int UDPListenPort = -1;
151          
163        // TCP Reader start (for heartbeats)
164        if(activateTCPReader) {
165            try {
166                // get the port number from the configuration
167                TCPListenPort = Integer.parseInt(cp.getProperty("Filter." + FilterMain.NAME, "Filter.TCPListenPort"));
168                // start the TCPReader
169                _logger.write(toString(), Logger.SYSINIT, "starting Filter TCP listener");
170                TCPReader tcpReader = new TCPReader(TCPListenPort, queue);
171                tcpReader.start();
172            } catch (PropertyNotFoundException e) {
173                _logger.write(toString(), Logger.WARNING, "Unable to start TCPReader due to missing configuration: " + e);
174            } catch (NumberFormatException e) {
175                _logger.write(toString(), Logger.WARNING, "Unable to start TCPReader due to invalid configuration: " + e);
176            }
177        }
178        
152          // UDP Reader start (for inbound host data)
153          if(activateUDPReader) {
154              try {
# Line 202 | Line 175 | public class FilterMain implements Component {
175          
176          // FilterInfoServant start (to provide filter information to the server)
177          _logger.write(toString(), Logger.SYSINIT, "starting Servant to provide filter information");
178 <        FilterInfoServant filterInfoServant = new FilterInfoServant(TCPListenPort, UDPListenPort);
178 >        FilterInfoServant filterInfoServant = new FilterInfoServant(UDPListenPort);
179          _refman.bindToOrb(filterInfoServant, "iscream.FilterInfo\\." + FilterMain.NAME);
180          
181          _logger.write(toString(), Logger.SYSINIT, "started");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines