java.lang.Object
org.snmp4j.mp.MPv3.HeaderData
- All Implemented Interfaces:
BERSerializable
- Enclosing class:
MPv3
The
HeaderData
represents the message header information of SNMPv3 message.- Version:
- 1.0
- Author:
- Frank Fock
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
decodeBER
(BERInputStream message) Decodes aVariable
from anInputStream
.void
encodeBER
(OutputStream outputStream) Encodes aVariable
to anOutputStream
.int
Returns the length of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).int
Returns the length of the payload of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).int
int
getMsgID()
int
int
void
setMsgFlags
(int flags) void
setMsgID
(int msgID) void
setMsgMaxSize
(int msgMaxSize) void
setSecurityModel
(int model)
-
Field Details
-
FLAG_AUTH
public static final byte FLAG_AUTH- See Also:
-
FLAG_PRIV
public static final byte FLAG_PRIV- See Also:
-
-
Constructor Details
-
HeaderData
public HeaderData()
-
-
Method Details
-
setMsgID
public void setMsgID(int msgID) -
getMsgID
public int getMsgID() -
setMsgMaxSize
public void setMsgMaxSize(int msgMaxSize) -
getMsgMaxSize
public int getMsgMaxSize() -
setMsgFlags
public void setMsgFlags(int flags) -
getMsgFlags
public int getMsgFlags() -
setSecurityModel
public void setSecurityModel(int model) -
getSecurityModel
public int getSecurityModel() -
getBERPayloadLength
public int getBERPayloadLength()Description copied from interface:BERSerializable
Returns the length of the payload of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
getBERPayloadLength
in interfaceBERSerializable
- Returns:
- the BER encoded length of this variable.
-
getBERLength
public int getBERLength()Description copied from interface:BERSerializable
Returns the length of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
getBERLength
in interfaceBERSerializable
- Returns:
- the BER encoded length of this variable.
-
decodeBER
Description copied from interface:BERSerializable
Decodes aVariable
from anInputStream
.- Specified by:
decodeBER
in interfaceBERSerializable
- Parameters:
message
- anInputStream
containing a BER encoded byte stream.- Throws:
IOException
- if the stream could not be decoded by using BER rules.
-
encodeBER
Description copied from interface:BERSerializable
Encodes aVariable
to anOutputStream
.- Specified by:
encodeBER
in interfaceBERSerializable
- Parameters:
outputStream
- anOutputStream
.- Throws:
IOException
- if an error occurs while writing to the stream.
-