KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > internal > SnmpAccessControlSubSystem


1 /*
2  * @(#)file SnmpAccessControlSubSystem.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.14
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 package com.sun.jmx.snmp.internal;
12
13 import com.sun.jmx.snmp.SnmpStatusException;
14 import com.sun.jmx.snmp.SnmpOid;
15 import com.sun.jmx.snmp.SnmpPdu;
16 import com.sun.jmx.snmp.SnmpUnknownAccContrModelException;
17 /**
18  * Access Control sub system interface. To allow engine integration, an Access Control sub system must implement this interface.
19  * <p><b>This API is a Sun Microsystems internal API and is subject
20  * to change without notice.</b></p>
21  * @since 1.5
22  */

23 public interface SnmpAccessControlSubSystem extends SnmpSubSystem {
24
25     /**
26      * Method called by the dispatcher in order to control the access at an SNMP pdu Level.
27      * <P> This call is routed by the sub system to the target model according to the SNMP protocol version number.</P>
28      * @param version The SNMP protocol version number.
29      * @param principal The request principal.
30      * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
31      * @param pduType The pdu type (get, set, ...).
32      * @param securityModel The security model ID.
33      * @param contextName The access control context name.
34      * @param pdu The pdu to check.
35      */

36     public void checkPduAccess(int version,
37                    String JavaDoc principal,
38                    int securityLevel,
39                    int pduType,
40                    int securityModel,
41                    byte[] contextName,
42                    SnmpPdu pdu) throws SnmpStatusException, SnmpUnknownAccContrModelException;
43     /**
44      * Method called by the dispatcher in order to control the access at an <CODE>SnmpOid</CODE> Level.
45      * This method is called after the <CODE>checkPduAccess</CODE> pdu based method.
46      * <P> This call is routed by the sub system to the target model according to the SNMP protocol version number.</P>
47      * @param version The SNMP protocol version number.
48      * @param principal The request principal.
49      * @param securityLevel The request security level as defined in <CODE>SnmpEngine</CODE>.
50      * @param pduType The pdu type (get, set, ...).
51      * @param securityModel The security model ID.
52      * @param contextName The access control context name.
53      * @param oid The OID to check.
54      */

55     public void checkAccess(int version,
56                 String JavaDoc principal,
57                 int securityLevel,
58                 int pduType,
59                 int securityModel,
60                 byte[] contextName,
61                 SnmpOid oid) throws SnmpStatusException, SnmpUnknownAccContrModelException;
62 }
63
Popular Tags