org.xins.server
Interface AccessRuleContainer

All Known Implementing Classes:
AccessRule, AccessRuleFile, AccessRuleList

public interface AccessRuleContainer

Collection of one or more access rules.

Since:
XINS 1.1.0
Version:
$Revision: 1.9 $ $Date: 2006/08/28 09:12:32 $
Author:
Anthony Goubard

Method Summary
 void dispose()
          Disposes this access rule.
 Boolean isAllowed(String ip, String functionName)
          Determines if the specified IP address is allowed to access the specified function.
 

Method Detail

isAllowed

public Boolean isAllowed(String ip,
                         String functionName)
                  throws IllegalArgumentException,
                         ParseException
Determines if the specified IP address is allowed to access the specified function.

This method finds the first matching rule and then returns the allow property of that rule (see AccessRule.isAllowRule()). If there is no matching rule, then null is returned.

Parameters:
ip - the IP address, cannot be null.
functionName - the name of the function, cannot be null.
Returns:
Boolean.TRUE if the specified IP address is allowed to access the specified function, Boolean.FALSE if it is disallowed access or null if there is no match.
Throws:
IllegalStateException - if dispose() has been called previously (since XINS 1.3.0).
IllegalArgumentException - if ip == null || functionName == null.
ParseException - if the specified IP address is malformed.

dispose

public void dispose()
Disposes this access rule. All claimed resources are freed as much as possible.

Once disposed, the isAllowed(java.lang.String, java.lang.String) method should no longer be called.

Throws:
IllegalStateException - if dispose() has been called previously (since XINS 1.3.0).


See http://www.xins.org/.