org.snmp4j.mp
Class StateReference

java.lang.Object
  extended by org.snmp4j.mp.StateReference
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MPv3.CacheEntry

public class StateReference
extends java.lang.Object
implements java.io.Serializable

The StateReference class represents state information associated with SNMP messages. The state reference is used to send response or report (SNMPv3 only). Depending on the security model not all fields may be filled.

Version:
1.2
Author:
Frank Fock
See Also:
Serialized Form

Constructor Summary
StateReference()
          Default constructor.
StateReference(int msgID, int msgFlags, int maxSizeResponseScopedPDU, PduHandle pduHandle, Address peerAddress, TransportMapping peerTransport, byte[] secEngineID, SecurityModel secModel, byte[] secName, int secLevel, byte[] contextEngineID, byte[] contextName, SecurityStateReference secStateReference, int errorCode)
          Creates a state reference for SNMPv3 messages.
StateReference(PduHandle pduHandle, Address peerAddress, TransportMapping peerTransport, SecurityModel secModel, byte[] secName, int errorCode)
          Creates a state reference for community based security models.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Address getAddress()
           
 byte[] getContextEngineID()
           
 byte[] getContextName()
           
 int getErrorCode()
           
 int getMaxSizeResponseScopedPDU()
           
 int getMsgFlags()
           
 int getMsgID()
           
 PduHandle getPduHandle()
           
 byte[] getSecurityEngineID()
           
 int getSecurityLevel()
           
 SecurityModel getSecurityModel()
           
 byte[] getSecurityName()
           
 SecurityStateReference getSecurityStateReference()
           
 TransportMapping getTransportMapping()
           
 int hashCode()
           
 boolean isReportable()
           
 void setAddress(Address address)
           
 void setContextEngineID(byte[] contextEngineID)
           
 void setContextName(byte[] contextName)
           
 void setErrorCode(int errorCode)
           
 void setMaxSizeResponseScopedPDU(int maxSizeResponseScopedPDU)
           
 void setMsgFlags(int msgFlags)
           
 void setMsgID(int msgID)
           
 void setPduHandle(PduHandle pduHandle)
           
 void setSecurityEngineID(byte[] securityEngineID)
           
 void setSecurityLevel(int securityLevel)
           
 void setSecurityModel(SecurityModel securityModel)
           
 void setSecurityName(byte[] securityName)
           
 void setSecurityStateReference(SecurityStateReference securityStateReference)
           
 void setTransportMapping(TransportMapping transportMapping)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateReference

public StateReference()
Default constructor.


StateReference

public StateReference(PduHandle pduHandle,
                      Address peerAddress,
                      TransportMapping peerTransport,
                      SecurityModel secModel,
                      byte[] secName,
                      int errorCode)
Creates a state reference for community based security models.

Parameters:
pduHandle - PduHandle
peerAddress - Address
peerTransport - the TransportMapping to be used to communicate with the peer.
secModel - SecurityModel
secName - a community string.
errorCode - an error code associated with the SNMP message.

StateReference

public StateReference(int msgID,
                      int msgFlags,
                      int maxSizeResponseScopedPDU,
                      PduHandle pduHandle,
                      Address peerAddress,
                      TransportMapping peerTransport,
                      byte[] secEngineID,
                      SecurityModel secModel,
                      byte[] secName,
                      int secLevel,
                      byte[] contextEngineID,
                      byte[] contextName,
                      SecurityStateReference secStateReference,
                      int errorCode)
Creates a state reference for SNMPv3 messages.

Parameters:
msgID - int
msgFlags - int
maxSizeResponseScopedPDU - int
pduHandle - PduHandle
peerAddress - Address
peerTransport - the TransportMapping to be used to communicate with the peer.
secEngineID - byte[]
secModel - SecurityModel
secName - byte[]
secLevel - int
contextEngineID - byte[]
contextName - byte[]
secStateReference - SecurityStateReference
errorCode - int
Method Detail

isReportable

public boolean isReportable()

getAddress

public Address getAddress()

setAddress

public void setAddress(Address address)

setContextEngineID

public void setContextEngineID(byte[] contextEngineID)

getContextEngineID

public byte[] getContextEngineID()

setContextName

public void setContextName(byte[] contextName)

getContextName

public byte[] getContextName()

setSecurityModel

public void setSecurityModel(SecurityModel securityModel)

getSecurityModel

public SecurityModel getSecurityModel()

setSecurityName

public void setSecurityName(byte[] securityName)

getSecurityName

public byte[] getSecurityName()

setSecurityLevel

public void setSecurityLevel(int securityLevel)

getSecurityLevel

public int getSecurityLevel()

setSecurityStateReference

public void setSecurityStateReference(SecurityStateReference securityStateReference)

getSecurityStateReference

public SecurityStateReference getSecurityStateReference()

setMsgID

public void setMsgID(int msgID)

getMsgID

public int getMsgID()

setMsgFlags

public void setMsgFlags(int msgFlags)

getMsgFlags

public int getMsgFlags()

setMaxSizeResponseScopedPDU

public void setMaxSizeResponseScopedPDU(int maxSizeResponseScopedPDU)

getMaxSizeResponseScopedPDU

public int getMaxSizeResponseScopedPDU()

getPduHandle

public PduHandle getPduHandle()

getSecurityEngineID

public byte[] getSecurityEngineID()

getErrorCode

public int getErrorCode()

getTransportMapping

public TransportMapping getTransportMapping()

setPduHandle

public void setPduHandle(PduHandle pduHandle)

setSecurityEngineID

public void setSecurityEngineID(byte[] securityEngineID)

setErrorCode

public void setErrorCode(int errorCode)

setTransportMapping

public void setTransportMapping(TransportMapping transportMapping)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.