Class sun.server.http.security.HttpAclImpl
All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.http.security.HttpAclImpl
java.lang.Object
|
+----sun.security.acl.OwnerImpl
|
+----sun.security.acl.AclImpl
|
+----sun.server.http.security.HttpAclImpl
- public class HttpAclImpl
- extends AclImpl
An Access Control List (ACL) is encapsulated by this class.
-
HttpAclImpl(Principal, String, Properties, TraceLog)
- Construct an Http ACL with the owner and
acl name as given.
-
addHost(String)
- Add a host to the list of hosts allowed access.
-
checkHost(String, String)
- Check if the passed host name is allowed access.
-
checkPermission(HttpRequest)
- This method checks whether or not the specified principal from the
specified host has the required permission.
-
removeHost(String)
- remove the host from the list of hosts allowed access.
-
toString()
-
overrides the toString() method in java.security.acl.AclImpl
HttpAclImpl
public HttpAclImpl(Principal owner,
String aclName,
Properties aclProperties,
TraceLog log)
- Construct an Http ACL with the owner and
acl name as given.
- Parameters:
- owner - The inital owner of this ACL.
- aclName - The name of this ACL.
- log - the event log.
addHost
public synchronized boolean addHost(String hostName)
- Add a host to the list of hosts allowed access.
- Parameters:
- hostName - the name of the host to be allowed access.
- Returns:
- true if success, false if failure.
removeHost
public synchronized boolean removeHost(String hostName)
- remove the host from the list of hosts allowed access.
- Parameters:
- hostName - the name of the host to be removed.
- Returns:
- true of success, false otherwise.
checkHost
public boolean checkHost(String hostName,
String hostAddress)
- Check if the passed host name is allowed access.
- Parameters:
- host - the name of the host in the request that has to be checked.
- Returns:
- true if the host is allowed access, false otherwise
checkPermission
public boolean checkPermission(HttpRequest req)
- This method checks whether or not the specified principal from the
specified host has the required permission. If not, a false
is returned, a true value is returned if allowed.
This method does not authenticate the principal. It presumes that the
principal is a valid authenticated principal.
- Parameters:
- req - the http request class
- Returns:
- true of the principal has the permission desired, false otherwise.
toString
public String toString()
- overrides the toString() method in java.security.acl.AclImpl
- Overrides:
- toString in class AclImpl
All Packages Class Hierarchy This Package Previous Next Index