KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > InetAddressAcl


1 /*
2  * @(#)file InetAddressAcl.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.9
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12 package com.sun.jmx.snmp;
13
14 // java import
15
//
16
import java.net.InetAddress JavaDoc;
17 import java.util.Enumeration JavaDoc;
18
19 /**
20  * Defines the IP address based ACL used by the SNMP protocol adaptor.
21  * <p>
22  * <p><b>This API is a Sun Microsystems internal API and is subject
23  * to change without notice.</b></p>
24  * @since 1.5
25  */

26
27 public interface InetAddressAcl {
28
29     /**
30      * Returns the name of the ACL.
31      *
32      * @return The name of the ACL.
33      */

34     public String JavaDoc getName();
35
36     /**
37      * Checks whether or not the specified host has <CODE>READ</CODE> access.
38      *
39      * @param address The host address to check.
40      *
41      * @return <CODE>true</CODE> if the host has read permission, <CODE>false</CODE> otherwise.
42      */

43     public boolean checkReadPermission(InetAddress JavaDoc address);
44
45     /**
46      * Checks whether or not the specified host and community have <CODE>READ</CODE> access.
47      *
48      * @param address The host address to check.
49      * @param community The community associated with the host.
50      *
51      * @return <CODE>true</CODE> if the pair (host, community) has read permission, <CODE>false</CODE> otherwise.
52      */

53     public boolean checkReadPermission(InetAddress JavaDoc address, String JavaDoc community);
54
55     /**
56      * Checks whether or not a community string is defined.
57      *
58      * @param community The community to check.
59      *
60      * @return <CODE>true</CODE> if the community is known, <CODE>false</CODE> otherwise.
61      */

62     public boolean checkCommunity(String JavaDoc community);
63
64     /**
65      * Checks whether or not the specified host has <CODE>WRITE</CODE> access.
66      *
67      * @param address The host address to check.
68      *
69      * @return <CODE>true</CODE> if the host has write permission, <CODE>false</CODE> otherwise.
70      */

71     public boolean checkWritePermission(InetAddress JavaDoc address);
72
73     /**
74      * Checks whether or not the specified host and community have <CODE>WRITE</CODE> access.
75      *
76      * @param address The host address to check.
77      * @param community The community associated with the host.
78      *
79      * @return <CODE>true</CODE> if the pair (host, community) has write permission, <CODE>false</CODE> otherwise.
80      */

81     public boolean checkWritePermission(InetAddress JavaDoc address, String JavaDoc community);
82
83     /**
84      * Returns an enumeration of trap destinations.
85      *
86      * @return An enumeration of the trap destinations (enumeration of <CODE>InetAddress<CODE>).
87      */

88     public Enumeration JavaDoc getTrapDestinations();
89
90     /**
91      * Returns an enumeration of trap communities for a given host.
92      *
93      * @param address The address of the host.
94      *
95      * @return An enumeration of trap communities for a given host (enumeration of <CODE>String<CODE>).
96      */

97     public Enumeration JavaDoc getTrapCommunities(InetAddress JavaDoc address);
98
99     /**
100      * Returns an enumeration of inform destinations.
101      *
102      * @return An enumeration of the inform destinations (enumeration of <CODE>InetAddress<CODE>).
103      */

104     public Enumeration JavaDoc getInformDestinations();
105
106     /**
107      * Returns an enumeration of inform communities for a given host.
108      *
109      * @param address The address of the host.
110      *
111      * @return An enumeration of inform communities for a given host (enumeration of <CODE>String<CODE>).
112      */

113     public Enumeration JavaDoc getInformCommunities(InetAddress JavaDoc address);
114 }
115
Popular Tags