KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > security > UsmSecurityStateReference


1 /*_############################################################################
2   _##
3   _## SNMP4J - UsmSecurityStateReference.java
4   _##
5   _## Copyright 2003-2007 Frank Fock and Jochen Katz (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22
23
24
25 package org.snmp4j.security;
26
27 /**
28  * The <code>UsmSecurityStateReference</code> holds cached security data.
29  *
30  * @author Frank Fock
31  * @version 1.1
32  */

33 public class UsmSecurityStateReference implements SecurityStateReference {
34
35   private byte[] userName;
36   private byte[] securityName;
37   private byte[] securityEngineID;
38   private AuthenticationProtocol authenticationProtocol;
39   private PrivacyProtocol privacyProtocol;
40   private byte[] authenticationKey;
41   private byte[] privacyKey;
42   private int securityLevel;
43
44   public UsmSecurityStateReference() {
45   }
46   public byte[] getUserName() {
47     return userName;
48   }
49   public void setUserName(byte[] userName) {
50     this.userName = userName;
51   }
52   public void setSecurityName(byte[] securityName) {
53     this.securityName = securityName;
54   }
55   public byte[] getSecurityName() {
56     return securityName;
57   }
58   public void setSecurityEngineID(byte[] securityEngineID) {
59     this.securityEngineID = securityEngineID;
60   }
61   public byte[] getSecurityEngineID() {
62     return securityEngineID;
63   }
64   public void setAuthenticationProtocol(AuthenticationProtocol authenticationProtocol) {
65     this.authenticationProtocol = authenticationProtocol;
66   }
67   public AuthenticationProtocol getAuthenticationProtocol() {
68     return authenticationProtocol;
69   }
70   public void setPrivacyProtocol(PrivacyProtocol privacyProtocol) {
71     this.privacyProtocol = privacyProtocol;
72   }
73   public PrivacyProtocol getPrivacyProtocol() {
74     return privacyProtocol;
75   }
76   public void setAuthenticationKey(byte[] authenticationKey) {
77     this.authenticationKey = authenticationKey;
78   }
79   public byte[] getAuthenticationKey() {
80     return authenticationKey;
81   }
82   public void setPrivacyKey(byte[] privacyKey) {
83     this.privacyKey = privacyKey;
84   }
85   public byte[] getPrivacyKey() {
86     return privacyKey;
87   }
88   public void setSecurityLevel(int securityLevel) {
89     this.securityLevel = securityLevel;
90   }
91   public int getSecurityLevel() {
92     return securityLevel;
93   }
94 }
95
Popular Tags