public class ScopedPDU extends PDU
ScopedPDU class represents a SNMPv3 scoped PDU.authorizationError, badValue, commitFailed, errorIndex, errorStatus, genErr, GET, GETBULK, GETNEXT, inconsistentName, inconsistentValue, INFORM, noAccess, noCreation, noError, noSuchName, NOTIFICATION, notWritable, readOnly, REPORT, requestID, resourceUnavailable, RESPONSE, SET, tooBig, TRAP, type, undoFailed, V1TRAP, variableBindings, wrongEncoding, wrongLength, wrongType, wrongValue| Constructor and Description |
|---|
ScopedPDU()
Create a empty ScopedPDU.
|
ScopedPDU(ScopedPDU other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
void |
decodeBER(BERInputStream inputStream)
Decodes a
ScopedPDU from an InputStream. |
void |
encodeBER(OutputStream outputStream)
Encodes a
Variable to an OutputStream. |
boolean |
equals(Object obj) |
int |
getBERLength()
Returns the length of this
BERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER). |
int |
getBERPayloadLength()
Returns the length of the payload of this
BERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER). |
OctetString |
getContextEngineID()
Gets the context engine ID of this scoped PDU.
|
OctetString |
getContextName()
Gets the context name of this scoped PDU.
|
void |
setContextEngineID(OctetString contextEngineID)
Sets the context engine ID field of the scoped PDU.
|
void |
setContextName(OctetString contextName)
Sets the context name field of this scoped PDU.
|
String |
toString()
Returns a string representation of the object.
|
add, addAll, addAll, addAllOIDs, addOID, clear, get, getBERLength, getBERPayloadLengthPDU, getBindingList, getErrorIndex, getErrorStatus, getErrorStatusText, getMaxRepetitions, getNonRepeaters, getRequestID, getType, getTypeFromString, getTypeString, getVariable, getVariableBindings, hashCode, isConfirmedPdu, isResponsePdu, remove, set, setErrorIndex, setErrorStatus, setMaxRepetitions, setNonRepeaters, setRequestID, setType, setVariableBindings, size, toArray, toErrorStatusText, trimpublic ScopedPDU()
public ScopedPDU(ScopedPDU other)
other - a ScopedPDU instance.public void setContextEngineID(OctetString contextEngineID)
contextEngineID - an OctetString instance (must not be null).NullPointerException - if contextEngineID == nullpublic OctetString getContextEngineID()
OctetString instance.public void setContextName(OctetString contextName)
contextName - an OctetString instance (must not be null).public OctetString getContextName()
OctetString instance.public int getBERLength()
BERSerializableBERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER).getBERLength in interface BERSerializablegetBERLength in class PDUpublic int getBERPayloadLength()
BERSerializableBERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER).getBERPayloadLength in interface BERSerializablegetBERPayloadLength in class PDUpublic void encodeBER(OutputStream outputStream) throws IOException
BERSerializableVariable to an OutputStream.encodeBER in interface BERSerializableencodeBER in class PDUoutputStream - an OutputStream.IOException - if an error occurs while writing to the stream.public void decodeBER(BERInputStream inputStream) throws IOException
ScopedPDU from an InputStream.decodeBER in interface BERSerializabledecodeBER in class PDUinputStream - an InputStream containing a BER encoded
byte stream.IOExceptionpublic String toString()
Copyright © 2016 SNMP4J.org. All Rights Reserved.