KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)file SnmpSecurityParameters.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.17
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;
12 import com.sun.jmx.snmp.SnmpStatusException;
13 import com.sun.jmx.snmp.SnmpTooBigException;
14
15 /**
16  * Security parameters are security model dependent. Every security parameters class wishing to be passed to a security model must implement this marker interface.
17  * This interface has to be implemented when developing customized security models.
18  * <p><b>This API is a Sun Microsystems internal API and is subject
19  * to change without notice.</b></p>
20  * @since 1.5
21  */

22 public interface SnmpSecurityParameters {
23     /**
24      * BER encoding of security parameters.
25      * @param outputBytes Array to fill.
26      * @return Encoded parameters length.
27      */

28     int encode(byte[] outputBytes) throws SnmpTooBigException;
29     /**
30      * BER decoding of security parameters.
31      * @param params Encoded parameters.
32      */

33     void decode(byte[] params) throws SnmpStatusException;
34
35     /**
36      * Principal coded inside the security parameters.
37      * @return The security principal.
38      */

39     String JavaDoc getPrincipal();
40 }
41
Popular Tags