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.

Constructor Index

 o HttpAclImpl(Principal, String, Properties, TraceLog)
Construct an Http ACL with the owner and acl name as given.

Method Index

 o addHost(String)
Add a host to the list of hosts allowed access.
 o checkHost(String, String)
Check if the passed host name is allowed access.
 o checkPermission(HttpRequest)
This method checks whether or not the specified principal from the specified host has the required permission.
 o removeHost(String)
remove the host from the list of hosts allowed access.
 o toString()
overrides the toString() method in java.security.acl.AclImpl

Constructors

 o 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.

Methods

 o 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.
 o 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.
 o 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
 o 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.
 o 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