1 20 21 package org.snmp4j; 22 23 import org.snmp4j.smi.OctetString; 24 import java.io.*; 25 import org.snmp4j.security.SecurityLevel; 26 import org.snmp4j.security.SecurityModel; 27 import org.snmp4j.smi.Address; 28 29 36 public abstract class SecureTarget 37 extends AbstractTarget implements Serializable { 38 39 private static final long serialVersionUID = 3864834593299255038L; 40 41 private int securityLevel = SecurityLevel.NOAUTH_NOPRIV; 42 private int securityModel = SecurityModel.SECURITY_MODEL_ANY; 43 private OctetString securityName = new OctetString(); 44 45 48 protected SecureTarget() { 49 } 50 51 60 protected SecureTarget(Address address, OctetString securityName) { 61 super(address); 62 setSecurityName(securityName); 63 } 64 65 71 public int getSecurityModel() { 72 return securityModel; 73 } 74 75 83 public final OctetString getSecurityName() { 84 return securityName; 85 } 86 87 97 public int getSecurityLevel() { 98 return securityLevel; 99 } 100 101 113 public void setSecurityLevel(int securityLevel) { 114 this.securityLevel = securityLevel; 115 } 116 117 123 public void setSecurityModel(int securityModel) { 124 this.securityModel = securityModel; 125 } 126 127 133 public final void setSecurityName(OctetString securityName) { 134 this.securityName = securityName; 135 } 136 137 } 138 | Popular Tags |