Class Overview
Is a partially decoded representation of an SNMP packet.
 
 You will not normally need to use this class unless you decide to
 implement your own SnmpPduFactory object.
 
 The SnmpMessage class is directly mapped onto the
 Message syntax defined in RFC1157 and RFC1902.
 
 
 Message ::= SEQUENCE {
    version       INTEGER { version(1) }, -- for SNMPv2
    community     OCTET STRING,           -- community name
    data          ANY                     -- an SNMPv2 PDU
 }
 
 
 This API is a Sun Microsystems internal API  and is subject
 to change without notice.
  
 
Summary
| 
  [Expand]
   Inherited Constants  | 
   From interface
com.sun.jmx.snmp.SnmpDefinitions
  
   
  
    
    
    
    
        | int | 
        CtxtConsFlag | 
         | 
     
    
    
    
        | int | 
        authMask | 
         | 
     
    
    
    
        | int | 
        authNoPriv | 
         | 
     
    
    
    
        | int | 
        authPriv | 
         | 
     
    
    
    
        | int | 
        authPrivMask | 
         | 
     
    
    
    
        | int | 
        noAuthNoPriv | 
         | 
     
    
    
    
        | int | 
        noGroupName | 
         | 
     
    
    
    
        | int | 
        noSuchContext | 
         | 
     
    
    
    
        | int | 
        noSuchView | 
         | 
     
    
    
    
        | int | 
        notInView | 
         | 
     
    
    
    
        | int | 
        pduGetBulkRequestPdu | 
         | 
     
    
    
    
        | int | 
        pduGetNextRequestPdu | 
         | 
     
    
    
    
        | int | 
        pduGetRequestPdu | 
         | 
     
    
    
    
        | int | 
        pduGetResponsePdu | 
         | 
     
    
    
    
        | int | 
        pduInformRequestPdu | 
         | 
     
    
    
    
        | int | 
        pduReportPdu | 
         | 
     
    
    
    
        | int | 
        pduSetRequestPdu | 
         | 
     
    
    
    
        | int | 
        pduV1TrapPdu | 
         | 
     
    
    
    
        | int | 
        pduV2TrapPdu | 
         | 
     
    
    
    
        | int | 
        pduWalkRequest | 
         | 
     
    
    
    
        | int | 
        privMask | 
         | 
     
    
    
    
        | int | 
        reportableFlag | 
         | 
     
    
    
    
        | int | 
        snmpAuthNotSupported | 
         | 
     
    
    
    
        | int | 
        snmpBadSecurityLevel | 
         | 
     
    
    
    
        | int | 
        snmpPrivNotSupported | 
         | 
     
    
    
    
        | int | 
        snmpReqAborted | 
         | 
     
    
    
    
        | int | 
        snmpReqEncodingError | 
         | 
     
    
    
    
        | int | 
        snmpReqHandleTooBig | 
         | 
     
    
    
    
        | int | 
        snmpReqInternalError | 
         | 
     
    
    
    
        | int | 
        snmpReqPacketOverflow | 
         | 
     
    
    
    
        | int | 
        snmpReqRefireAfterVbFix | 
         | 
     
    
    
    
        | int | 
        snmpReqSocketIOError | 
         | 
     
    
    
    
        | int | 
        snmpReqTimeout | 
         | 
     
    
    
    
        | int | 
        snmpReqTooBigImpossible | 
         | 
     
    
    
    
        | int | 
        snmpReqUnknownError | 
         | 
     
    
    
    
        | int | 
        snmpRspAuthorizationError | 
         | 
     
    
    
    
        | int | 
        snmpRspBadValue | 
         | 
     
    
    
    
        | int | 
        snmpRspCommitFailed | 
         | 
     
    
    
    
        | int | 
        snmpRspDecodingError | 
         | 
     
    
    
    
        | int | 
        snmpRspEndOfTable | 
         | 
     
    
    
    
        | int | 
        snmpRspGenErr | 
         | 
     
    
    
    
        | int | 
        snmpRspInconsistentName | 
         | 
     
    
    
    
        | int | 
        snmpRspInconsistentValue | 
         | 
     
    
    
    
        | int | 
        snmpRspNoAccess | 
         | 
     
    
    
    
        | int | 
        snmpRspNoCreation | 
         | 
     
    
    
    
        | int | 
        snmpRspNoError | 
         | 
     
    
    
    
        | int | 
        snmpRspNoSuchName | 
         | 
     
    
    
    
        | int | 
        snmpRspNotWritable | 
         | 
     
    
    
    
        | int | 
        snmpRspReadOnly | 
         | 
     
    
    
    
        | int | 
        snmpRspResourceUnavailable | 
         | 
     
    
    
    
        | int | 
        snmpRspTooBig | 
         | 
     
    
    
    
        | int | 
        snmpRspUndoFailed | 
         | 
     
    
    
    
        | int | 
        snmpRspWrongEncoding | 
         | 
     
    
    
    
        | int | 
        snmpRspWrongLength | 
         | 
     
    
    
    
        | int | 
        snmpRspWrongType | 
         | 
     
    
    
    
        | int | 
        snmpRspWrongValue | 
         | 
     
    
    
    
        | int | 
        snmpUnknownPrincipal | 
         | 
     
    
    
    
        | int | 
        snmpUsmBadEngineId | 
         | 
     
    
    
    
        | int | 
        snmpUsmInvalidTimeliness | 
         | 
     
    
    
    
        | int | 
        snmpUsmSecurityModel | 
         | 
     
    
    
    
        | int | 
        snmpV1AccessControlModel | 
         | 
     
    
    
    
        | int | 
        snmpV1MsgProcessingModel | 
         | 
     
    
    
    
        | int | 
        snmpV1SecurityModel | 
         | 
     
    
    
    
        | int | 
        snmpV2AccessControlModel | 
         | 
     
    
    
    
        | int | 
        snmpV2MsgProcessingModel | 
         | 
     
    
    
    
        | int | 
        snmpV2SecurityModel | 
         | 
     
    
    
    
        | int | 
        snmpV3AccessControlModel | 
         | 
     
    
    
    
        | int | 
        snmpV3MsgProcessingModel | 
         | 
     
    
    
    
        | byte | 
        snmpVersionOne | 
         | 
     
    
    
    
        | byte | 
        snmpVersionThree | 
         | 
     
    
    
    
        | byte | 
        snmpVersionTwo | 
         | 
     
    
    
    
        | int | 
        snmpWrongSnmpVersion | 
         | 
     
    
    
    
        | int | 
        trapAuthenticationFailure | 
         | 
     
    
    
    
        | int | 
        trapColdStart | 
         | 
     
    
    
    
        | int | 
        trapEgpNeighborLoss | 
         | 
     
    
    
    
        | int | 
        trapEnterpriseSpecific | 
         | 
     
    
    
    
        | int | 
        trapLinkDown | 
         | 
     
    
    
    
        | int | 
        trapLinkUp | 
         | 
     
    
    
    
        | int | 
        trapWarmStart | 
         | 
     
    
    
 
   
 
 | 
| Fields | 
    
      
          | 
          public
          
          
          byte[] | 
          community | 
          Community name. | 
      
      
    
| Public Methods | 
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        decodeMessage(byte[] inputBytes, int byteCount)
        
         Decodes the specified bytes and initializes this message. 
  
   | 
	 
    
        | 
            
            
            
            
            
            SnmpPdu
         | 
        
        decodeSnmpPdu()
        
         Gets the PDU encoded in this message. 
  
   | 
	 
    
        | 
            
            
            
            
            
            int
         | 
        
        encodeMessage(byte[] outputBytes)
        
         Encodes this message and puts the result in the specified byte array. 
  
   | 
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        encodeSnmpPdu(SnmpPdu pdu, int maxDataLength)
        
         Initializes this message with the specified pdu. 
  
   | 
	 
    
        | 
            
            
            
            
            
            int
         | 
        
        getRequestId(byte[] inputBytes)
        
         Returns the associated request ID. 
  
   | 
	 
    
        | 
            
            
            
            
            
            String
         | 
        
        printMessage()
        
         Dumps this message in a string. 
  
   | 
| 
  [Expand]
   Inherited Methods  | 
   
From class
  com.sun.jmx.snmp.SnmpMsg
  
   
  
    
    
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        decodeMessage(byte[] inputBytes, int byteCount)
        
         Decodes the specified bytes and initializes this message. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            SnmpPdu
         | 
        
        decodeSnmpPdu()
        
         Gets the PDU encoded in this message. 
  
   |  
	 
    
        | 
            
            
            
            
            
            SnmpVarBind[]
         | 
        
        decodeVarBindList(BerDecoder bdec)
        
         For SNMP Runtime private use only. 
  
   |  
	 
    
        | 
            
            
            
            static
            
            String
         | 
        
        dumpHexBuffer(byte[] b, int offset, int len)
        
         Dumps the content of a byte buffer using hexadecimal form. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            int
         | 
        
        encodeMessage(byte[] outputBytes)
        
         Encodes this message and puts the result in the specified byte array. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        encodeSnmpPdu(SnmpPdu pdu, int maxDataLength)
        
         Initializes this message with the specified pdu. 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        encodeVarBindList(BerEncoder benc, SnmpVarBind[] varBindList)
        
         For SNMP Runtime private use only. 
  
   |  
	 
    
        | 
            
            
            
            static
            
            int
         | 
        
        getProtocolVersion(byte[] data)
        
         Returns the encoded SNMP version present in the passed byte array. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            int
         | 
        
        getRequestId(byte[] data)
        
         Returns the associated request ID. 
  
   |  
	 
    
        | 
            
            
            
            
            
            String
         | 
        
        printMessage()
        
         Dumps this message in a string. 
  
   |  
 
   
 
 | 
   
From class
  java.lang.Object
  
   
  
    
    
	 
    
        | 
            
            
            
            
            
            Object
         | 
        
        clone()
        
         Creates and returns a copy of this object. 
  
   |  
	 
    
        | 
            
            
            
            
            
            boolean
         | 
        
        equals(Object obj)
        
         Indicates whether some other object is "equal to" this one. 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        finalize()
        
         Called by the garbage collector on an object when garbage collection
 determines that there are no more references to the object. 
  
   |  
	 
    
        | 
            
            
            final
            
            
            Class<?>
         | 
        
        getClass()
        
         Returns the runtime class of this Object. 
  
   |  
	 
    
        | 
            
            
            
            
            
            int
         | 
        
        hashCode()
        
         Returns a hash code value for the object. 
  
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        notify()
        
         Wakes up a single thread that is waiting on this object's
 monitor. 
  
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        notifyAll()
        
         Wakes up all threads that are waiting on this object's monitor. 
  
   |  
	 
    
        | 
            
            
            
            
            
            String
         | 
        
        toString()
        
         Returns a string representation of the object. 
  
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait()
        
        Causes the current thread to wait until another thread invokes the
  notify() method or the
  notifyAll() method for this object.  
  
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait(long timeout, int nanos)
        
        Causes the current thread to wait until another thread invokes the
  notify() method or the
  notifyAll() method for this object, or
 some other thread interrupts the current thread, or a certain
 amount of real time has elapsed.  
  
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait(long timeout)
        
        Causes the current thread to wait until either another thread invokes the
  notify() method or the
  notifyAll() method for this object, or a
 specified amount of time has elapsed.  
  
   |  
 
   
 
 | 
 
Fields
Public Constructors
Public Methods
 
    
      
        public 
         
         
         
         
        void
      
      decodeMessage
      (byte[] inputBytes, int byteCount)
    
      
    
      
  Decodes the specified bytes and initializes this message.
 For internal use only.
 
  
      Parameters
      
        
          | inputBytes
           | The bytes to be decoded. | 
        
      
   
  
     
 
 
    
      
        public 
         
         
         
         
        SnmpPdu
      
      decodeSnmpPdu
      ()
    
      
    
      
  Gets the PDU encoded in this message.
 
 This method decodes the data field and returns the resulting PDU.
 
  
  
     
 
 
    
      
        public 
         
         
         
         
        int
      
      encodeMessage
      (byte[] outputBytes)
    
      
    
      
  Encodes this message and puts the result in the specified byte array.
 For internal use only.
 
  
      Parameters
      
        
          | outputBytes
           | An array to receive the resulting encoding. | 
        
      
   
  
     
 
 
    
      
        public 
         
         
         
         
        void
      
      encodeSnmpPdu
      (SnmpPdu pdu, int maxDataLength)
    
      
    
      
  Initializes this message with the specified pdu.
 
 This method initializes the data field with an array of
 maxDataLength bytes. It encodes the pdu.
 The resulting encoding is stored in the data field
 and the length of the encoding is stored in dataLength.
 
 If the encoding length exceeds maxDataLength,
 the method throws an exception.
 
  
      Parameters
      
        
          | pdu
           | The PDU to be encoded. | 
        
        
          | maxDataLength
           | The maximum length permitted for the data field. | 
        
      
   
  
     
 
 
    
      
        public 
         
         
         
         
        int
      
      getRequestId
      (byte[] inputBytes)
    
      
    
      
  Returns the associated request ID.
 
  
      Parameters
      
        
          | inputBytes
           | The flat message. | 
        
      
   
  
  
     
 
 
    
      
        public 
         
         
         
         
        String
      
      printMessage
      ()
    
      
    
      
  Dumps this message in a string.
 
  
      Returns
      - The string containing the dump.