Some final tidying to the ACL code. The IP address checking has been moved out of the add method to a more suitable location. The code now seems to be more readable. This should be the last 'feature' that needs doing.
Added an ACLDatagramSocket. Operation is much the same as the ACLServerSocket. Also tweaked the toString() to keep the i-scream bits as well as the more useful stuff.
Some significant internal changes. It should be noted that this code is still in the debugging stage, and thus contains lots of println's :-) The most obvious change is that when adding a rule we try to determine if it's and IP address given as the expression. If it is, we store this in a short[] in the ACLRule inner class. Then when performing a check we look to see if it's an IP address rule, and then do a special check for IP addresses - which is much more efficient than comparing two strings. We have also halved the checks done by only comparing a rule to either the name or IP, rather than both.
The getACLString() method has been changed to a toString() method, and the i-scream style toString() has been dropped. The functionality of toString() now more closely resembles the Java Map's in layout.
Added serialization support to the ACL class. Also added testing of this feature to the ACLTest class, which confirms it works nicely :-)
Fully commented, and further testing in the Socket environment. Probably ready to integrate into the main source tree under the server util package.
Initial checkin of ACL code for i-scream server. At present it should allow for ServerSocket's to be wrapped up with an access control list. Very simple to use, will javadoc sometime soon. Essentially construct a ACLServerSocket instead of a ServerSocket, then set an ACL (defaults to open ACL). Then it can be used as a ServerSocket due to inheritance, and will only return from the allow() method if the connecting Socket is permitted by the ACL.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.