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:
| Environment | Directory |
| Solaris | /etc/opt/SUNWconn/jaw/conf/jaw.acl |
| Windows NT | installDir\SUNWconn\jaw\etc\conf\jaw.acl |
-
Jawacl(String)
- Constructs the Java Dynamic Management Access Control List
based on IP addresses.
-
checkCommunity(String)
- Checks whether or not a community string is defined.
-
checkReadPermission(InetAddress)
- Checks whether or not the specified host has READ access.
-
checkReadPermission(InetAddress, String)
- Checks whether or not the specified host and community have READ access.
-
checkWritePermission(InetAddress)
- Checks whether or not the specified host has WRITE access.
-
checkWritePermission(InetAddress, String)
- Checks whether or not the specified host and community have WRITE access.
-
entries()
- Returns an enumeration of the entries in this ACL.
-
getAuthorizedListFile()
- Returns the full path of the file used to get ACL informations.
-
getName()
- Returns the name of the ACL.
-
getREAD()
- Returns the read permission instance used.
-
getTrapCommunities(InetAddress)
- Returns an enumeration of trap communities for a given host.
-
getTrapDestinations()
- Returns an enumeration of trap destinations.
-
getWRITE()
- Returns the write permission instance used.
-
rereadTheFile()
- Resets this ACL to the values contained in the configuration file.
-
setAuthorizedListFile(String)
- Sets the full path of the file containing the ACL informations.
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.
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.
getName
public String getName()
- Returns the name of the ACL.
- Returns:
- the name of the ACL.
getREAD
public static PermissionImpl getREAD()
- Returns the read permission instance used.
- Returns:
- the read permission instance.
getWRITE
public static PermissionImpl getWRITE()
- Returns the write permission instance used.
- Returns:
- the write permission instance.
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.
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.
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.
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.
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.
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.
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.
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.
getTrapDestinations
public Enumeration getTrapDestinations()
- Returns an enumeration of trap destinations.
- Returns:
- an enumeration of the trap destinations.
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