001: /*_############################################################################
002: _##
003: _## SNMP4J - UsmSecurityStateReference.java
004: _##
005: _## Copyright (C) 2003-2008 Frank Fock and Jochen Katz (SNMP4J.org)
006: _##
007: _## Licensed under the Apache License, Version 2.0 (the "License");
008: _## you may not use this file except in compliance with the License.
009: _## You may obtain a copy of the License at
010: _##
011: _## http://www.apache.org/licenses/LICENSE-2.0
012: _##
013: _## Unless required by applicable law or agreed to in writing, software
014: _## distributed under the License is distributed on an "AS IS" BASIS,
015: _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016: _## See the License for the specific language governing permissions and
017: _## limitations under the License.
018: _##
019: _##########################################################################*/
020:
021: package org.snmp4j.security;
022:
023: /**
024: * The <code>UsmSecurityStateReference</code> holds cached security data.
025: *
026: * @author Frank Fock
027: * @version 1.1
028: */
029: public class UsmSecurityStateReference implements
030: SecurityStateReference {
031:
032: private byte[] userName;
033: private byte[] securityName;
034: private byte[] securityEngineID;
035: private AuthenticationProtocol authenticationProtocol;
036: private PrivacyProtocol privacyProtocol;
037: private byte[] authenticationKey;
038: private byte[] privacyKey;
039: private int securityLevel;
040:
041: public UsmSecurityStateReference() {
042: }
043:
044: public byte[] getUserName() {
045: return userName;
046: }
047:
048: public void setUserName(byte[] userName) {
049: this .userName = userName;
050: }
051:
052: public void setSecurityName(byte[] securityName) {
053: this .securityName = securityName;
054: }
055:
056: public byte[] getSecurityName() {
057: return securityName;
058: }
059:
060: public void setSecurityEngineID(byte[] securityEngineID) {
061: this .securityEngineID = securityEngineID;
062: }
063:
064: public byte[] getSecurityEngineID() {
065: return securityEngineID;
066: }
067:
068: public void setAuthenticationProtocol(
069: AuthenticationProtocol authenticationProtocol) {
070: this .authenticationProtocol = authenticationProtocol;
071: }
072:
073: public AuthenticationProtocol getAuthenticationProtocol() {
074: return authenticationProtocol;
075: }
076:
077: public void setPrivacyProtocol(PrivacyProtocol privacyProtocol) {
078: this .privacyProtocol = privacyProtocol;
079: }
080:
081: public PrivacyProtocol getPrivacyProtocol() {
082: return privacyProtocol;
083: }
084:
085: public void setAuthenticationKey(byte[] authenticationKey) {
086: this .authenticationKey = authenticationKey;
087: }
088:
089: public byte[] getAuthenticationKey() {
090: return authenticationKey;
091: }
092:
093: public void setPrivacyKey(byte[] privacyKey) {
094: this .privacyKey = privacyKey;
095: }
096:
097: public byte[] getPrivacyKey() {
098: return privacyKey;
099: }
100:
101: public void setSecurityLevel(int securityLevel) {
102: this .securityLevel = securityLevel;
103: }
104:
105: public int getSecurityLevel() {
106: return securityLevel;
107: }
108: }
|