Package org.snmp4j
Class ScopedPDU
java.lang.Object
org.snmp4j.PDU
org.snmp4j.ScopedPDU
- All Implemented Interfaces:
 Serializable,BERSerializable
The 
ScopedPDU class represents a SNMPv3 scoped PDU.- Version:
 - 1.0
 - Author:
 - Frank Fock
 - See Also:
 
- 
Field Summary
Fields inherited from class org.snmp4j.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 Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionclone()voiddecodeBER(BERInputStream inputStream) Decodes aScopedPDUfrom anInputStream.voidencodeBER(OutputStream outputStream) Encodes aVariableto anOutputStream.booleanintReturns the length of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).intReturns the length of the payload of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).Gets the context engine ID of this scoped PDU.Gets the context name of this scoped PDU.voidsetContextEngineID(OctetString contextEngineID) Sets the context engine ID field of the scoped PDU.voidsetContextName(OctetString contextName) Sets the context name field of this scoped PDU.toString()Returns a string representation of the object.Methods inherited from class org.snmp4j.PDU
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, trim 
- 
Constructor Details
- 
ScopedPDU
public ScopedPDU()Create a empty ScopedPDU. - 
ScopedPDU
Copy constructor.- Parameters:
 other- aScopedPDUinstance.
 
 - 
 - 
Method Details
- 
setContextEngineID
Sets the context engine ID field of the scoped PDU.- Parameters:
 contextEngineID- anOctetStringinstance (must not benull).- Throws:
 NullPointerException- if contextEngineID == null
 - 
getContextEngineID
Gets the context engine ID of this scoped PDU.- Returns:
 - an 
OctetStringinstance. 
 - 
setContextName
Sets the context name field of this scoped PDU.- Parameters:
 contextName- anOctetStringinstance (must not benull).
 - 
getContextName
Gets the context name of this scoped PDU.- Returns:
 - an 
OctetStringinstance. 
 - 
getBERLength
public int getBERLength()Description copied from interface:BERSerializableReturns the length of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
 getBERLengthin interfaceBERSerializable- Overrides:
 getBERLengthin classPDU- Returns:
 - the BER encoded length of this variable.
 
 - 
getBERPayloadLength
public int getBERPayloadLength()Description copied from interface:BERSerializableReturns the length of the payload of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
 getBERPayloadLengthin interfaceBERSerializable- Overrides:
 getBERPayloadLengthin classPDU- Returns:
 - the BER encoded length of this variable.
 
 - 
encodeBER
Description copied from interface:BERSerializableEncodes aVariableto anOutputStream.- Specified by:
 encodeBERin interfaceBERSerializable- Overrides:
 encodeBERin classPDU- Parameters:
 outputStream- anOutputStream.- Throws:
 IOException- if an error occurs while writing to the stream.
 - 
clone
 - 
decodeBER
Decodes aScopedPDUfrom anInputStream.- Specified by:
 decodeBERin interfaceBERSerializable- Overrides:
 decodeBERin classPDU- Parameters:
 inputStream- anInputStreamcontaining a BER encoded byte stream.- Throws:
 IOException- if there is a BER encoding error or other IO exception in the input stream.
 - 
toString
Returns a string representation of the object. - 
equals
 
 -