Module org.snmp4j
Package org.snmp4j.mp

Class MPv3.HeaderData

  • All Implemented Interfaces:
    BERSerializable
    Enclosing class:
    MPv3


    public static class MPv3.HeaderData
    extends java.lang.Object
    implements BERSerializable
    The HeaderData represents the message header information of SNMPv3 message.
    Version:
    1.0
    Author:
    Frank Fock
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static byte FLAG_AUTH  
      static byte FLAG_PRIV  
    • Constructor Summary

      Constructors 
      Constructor Description
      HeaderData​()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decodeBER​(BERInputStream message)
      Decodes a Variable from an InputStream.
      void encodeBER​(java.io.OutputStream outputStream)
      Encodes a Variable to an OutputStream.
      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).
      int getMsgFlags​()  
      int getMsgID​()  
      int getMsgMaxSize​()  
      int getSecurityModel​()  
      void setMsgFlags​(int flags)  
      void setMsgID​(int msgID)  
      void setMsgMaxSize​(int msgMaxSize)  
      void setSecurityModel​(int model)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HeaderData

        public HeaderData​()
    • Method Detail

      • 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 this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
        Specified by:
        getBERPayloadLength in interface BERSerializable
        Returns:
        the BER encoded length of this variable.
      • getBERLength

        public int getBERLength​()
        Description copied from interface: BERSerializable
        Returns the length of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
        Specified by:
        getBERLength in interface BERSerializable
        Returns:
        the BER encoded length of this variable.
      • decodeBER

        public void decodeBER​(BERInputStream message)
                       throws java.io.IOException
        Description copied from interface: BERSerializable
        Decodes a Variable from an InputStream.
        Specified by:
        decodeBER in interface BERSerializable
        Parameters:
        message - an InputStream containing a BER encoded byte stream.
        Throws:
        java.io.IOException - if the stream could not be decoded by using BER rules.
      • encodeBER

        public void encodeBER​(java.io.OutputStream outputStream)
                       throws java.io.IOException
        Description copied from interface: BERSerializable
        Encodes a Variable to an OutputStream.
        Specified by:
        encodeBER in interface BERSerializable
        Parameters:
        outputStream - an OutputStream.
        Throws:
        java.io.IOException - if an error occurs while writing to the stream.