1 20 21 package org.snmp4j.mp; 22 23 import org.snmp4j.smi.VariableBinding; 24 import org.snmp4j.smi.Integer32; 25 import java.io.Serializable ; 26 27 33 public class StatusInformation implements Serializable { 34 35 private static final long serialVersionUID = 9053403603288070071L; 36 37 private VariableBinding errorIndication; 38 private byte[] contextName; 39 private byte[] contextEngineID; 40 private Integer32 securityLevel; 41 42 public StatusInformation() { 43 } 44 45 public StatusInformation(VariableBinding errorIndication, 46 byte[] contextName, 47 byte[] contextEngineID, 48 Integer32 securityLevel) { 49 this.errorIndication = errorIndication; 50 this.contextName = contextName; 51 this.contextEngineID = contextEngineID; 52 this.securityLevel = securityLevel; 53 } 54 55 public VariableBinding getErrorIndication() { 56 return errorIndication; 57 } 58 public void setErrorIndication(VariableBinding errorIndication) { 59 this.errorIndication = errorIndication; 60 } 61 public void setContextName(byte[] contextName) { 62 this.contextName = contextName; 63 } 64 public byte[] getContextName() { 65 return contextName; 66 } 67 public void setContextEngineID(byte[] contextEngineID) { 68 this.contextEngineID = contextEngineID; 69 } 70 public byte[] getContextEngineID() { 71 return contextEngineID; 72 } 73 public void setSecurityLevel(org.snmp4j.smi.Integer32 securityLevel) { 74 this.securityLevel = securityLevel; 75 } 76 public org.snmp4j.smi.Integer32 getSecurityLevel() { 77 return securityLevel; 78 } 79 80 public String toString() { 81 if (errorIndication == null) { 82 return "noError"; 83 } 84 return errorIndication.toString(); 85 } 86 } 87 88 | Popular Tags |