All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.adaptor.IPacl.Jawacl

java.lang.Object
   |
   +----com.sun.jaw.impl.adaptor.IPacl.Jawacl

public class Jawacl
extends Object
implements IPAclSrvIf, Serializable
This class defines an implementation of the IPAclSrvIf interface.

In this implementation the ACL information is stored on a flat file and its default location depends on the operating environment:

EnvironmentDirectory
Solaris/etc/opt/SUNWconn/jaw/conf/jaw.acl
Windows NTinstallDir\SUNWconn\jaw\etc\conf\jaw.acl


Constructor Index

 o Jawacl(String)
Constructs the Java Dynamic Management Access Control List based on IP addresses.

Method Index

 o checkCommunity(String)
Checks whether or not a community string is defined.
 o checkReadPermission(InetAddress)
Checks whether or not the specified host has READ access.
 o checkReadPermission(InetAddress, String)
Checks whether or not the specified host and community have READ access.
 o checkWritePermission(InetAddress)
Checks whether or not the specified host has WRITE access.
 o checkWritePermission(InetAddress, String)
Checks whether or not the specified host and community have WRITE access.
 o entries()
Returns an enumeration of the entries in this ACL.
 o getAuthorizedListFile()
Returns the full path of the file used to get ACL informations.
 o getName()
Returns the name of the ACL.
 o getREAD()
Returns the read permission instance used.
 o getTrapCommunities(InetAddress)
Returns an enumeration of trap communities for a given host.
 o getTrapDestinations()
Returns an enumeration of trap destinations.
 o getWRITE()
Returns the write permission instance used.
 o rereadTheFile()
Resets this ACL to the values contained in the configuration file.
 o setAuthorizedListFile(String)
Sets the full path of the file containing the ACL informations.

Constructors

 o Jawacl
 public Jawacl(String Owner) throws UnknownHostException
Constructs the Java Dynamic Management Access Control List based on IP addresses. The ACL will take the given owner name. The current IP address will be the owner of the ACL. The default file used to get the ACL information is /etc/opt/SUNWconn/jaw/conf/jaw.acl in Solaris and <installDir>\SUNWconn\jaw\etc\conf\jaw.acl in Windows NT.

Parameters:
owner - The name of the ACL.
Throws: UnknownHostException
if the local host is unknown.

Methods

 o entries
 public Enumeration entries()
Returns an enumeration of the entries in this ACL. Each element in the enumeration is of type java.security.acl.AclEntry.

Returns:
an enumeration of the entries in this ACL.
 o getName
 public String getName()
Returns the name of the ACL.

Returns:
the name of the ACL.
 o getREAD
 public static PermissionImpl getREAD()
Returns the read permission instance used.

Returns:
the read permission instance.
 o getWRITE
 public static PermissionImpl getWRITE()
Returns the write permission instance used.

Returns:
the write permission instance.
 o setAuthorizedListFile
 public void setAuthorizedListFile(String filename)
Sets the full path of the file containing the ACL informations.

Parameters:
filename - the full path of the file containing the ACL informations.
 o rereadTheFile
 public void rereadTheFile() throws NotOwnerException, UnknownHostException
Resets this ACL to the values contained in the configuration file.

Throws: NotOwnerException
if the principal attempting the reset is not an owner of this ACL.
Throws: UnknownHostException
if IP addresses for hosts contained in the ACL file couldn't be found.
 o getAuthorizedListFile
 public String getAuthorizedListFile()
Returns the full path of the file used to get ACL informations.

Returns:
the full path of the file used to get ACL informations.
 o checkReadPermission
 public boolean checkReadPermission(InetAddress address)
Checks whether or not the specified host has READ access.

Parameters:
address - the host address to check.
Returns:
true if the host has read permission, false otherwise.
 o checkReadPermission
 public boolean checkReadPermission(InetAddress address,
                                    String community)
Checks whether or not the specified host and community have READ access.

Parameters:
address - the host address to check.
community - the community associated with the host.
Returns:
true if the pair (host, community) has read permission, false otherwise.
 o checkCommunity
 public boolean checkCommunity(String community)
Checks whether or not a community string is defined.

Parameters:
community - the community to check.
Returns:
true if the community is known, false otherwise.
 o checkWritePermission
 public boolean checkWritePermission(InetAddress address)
Checks whether or not the specified host has WRITE access.

Parameters:
address - the host address to check.
Returns:
true if the host has write permission, false otherwise.
 o checkWritePermission
 public boolean checkWritePermission(InetAddress address,
                                     String community)
Checks whether or not the specified host and community have WRITE access.

Parameters:
address - the host address to check.
community - the community associated with the host.
Returns:
true if the pair (host, community) has write permission, false otherwise.
 o getTrapDestinations
 public Enumeration getTrapDestinations()
Returns an enumeration of trap destinations.

Returns:
an enumeration of the trap destinations.
 o getTrapCommunities
 public Enumeration getTrapCommunities(InetAddress i)
Returns an enumeration of trap communities for a given host.

Parameters:
i - the address of the host.
Returns:
an enumeration of trap communities for a given host.

All Packages  Class Hierarchy  This Package  Previous  Next  Index