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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filtermanager/HostListener.java (file contents):
Revision 1.9 by tdb, Tue May 29 17:02:35 2001 UTC vs.
Revision 1.10 by tdb, Wed Mar 20 12:56:37 2002 UTC

# Line 52 | Line 52 | class HostListener extends Thread {
52           * and then passing them off to other processes to deal with.
53           */
54      public void run(){
55 +        // get our ACL from the configuration
56 +        ACL acl = null;
57 +        try {
58 +            String stringACL = ConfigurationProxy.getInstance().getProperty("FilterManager", "FilterManager.ACL");
59 +            acl = new ACL(stringACL);
60 +        }
61 +        catch(PropertyNotFoundException e) {
62 +            _logger.write(toString(), Logger.WARNING, "No ACL found for FilterManager: " + e);
63 +        }
64 +        
65          ServerSocket listenSocket=null;
66                  // We use this boolean so we can break out of the while loop if we want
67          boolean run = true;
# Line 59 | Line 69 | class HostListener extends Thread {
69              // Work out the port we want
70              int listenPort = Integer.parseInt(ConfigurationProxy.getInstance().getProperty("FilterManager", "FilterManager.listenPort"));
71                          // Setup the ServerSocket so that clients can connect
72 <            listenSocket = new ServerSocket(listenPort);
72 >                        // use an ACLServerSocket if we have an ACL
73 >                        if(acl != null) {
74 >                            listenSocket = new ACLServerSocket(acl, listenPort);
75 >                        }
76 >                        else {
77 >                listenSocket = new ServerSocket(listenPort);
78 >            }
79              _logger.write(toString(), Logger.SYSMSG, "Server listening on "
80                                                                                  +InetAddress.getLocalHost().getHostName()
81                                                                                  +"/"+InetAddress.getLocalHost().getHostAddress()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines