java.io.Serializable
MPv3.CacheEntry
public class StateReference
extends java.lang.Object
implements java.io.Serializable
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.Modifier and Type | Field | Description |
---|---|---|
protected java.util.List<MessageID> |
retryMsgIDs |
Constructor | Description |
---|---|
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.
|
protected java.util.List<MessageID> retryMsgIDs
public StateReference()
public StateReference(PduHandle pduHandle, Address peerAddress, TransportMapping peerTransport, SecurityModel secModel, byte[] secName, int errorCode)
pduHandle
- PduHandlepeerAddress
- AddresspeerTransport
- the TransportMapping
to be used to communicate with the
peer.secModel
- SecurityModelsecName
- a community string.errorCode
- an error code associated with the SNMP message.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)
msgID
- intmsgFlags
- intmaxSizeResponseScopedPDU
- intpduHandle
- PduHandlepeerAddress
- AddresspeerTransport
- the TransportMapping
to be used to communicate with the
peer.secEngineID
- byte[]secModel
- SecurityModelsecName
- byte[]secLevel
- intcontextEngineID
- byte[]contextName
- byte[]secStateReference
- SecurityStateReferenceerrorCode
- intpublic boolean isReportable()
public Address getAddress()
public void setAddress(Address address)
public void setContextEngineID(byte[] contextEngineID)
public byte[] getContextEngineID()
public void setContextName(byte[] contextName)
public byte[] getContextName()
public void setSecurityModel(SecurityModel securityModel)
public SecurityModel getSecurityModel()
public void setSecurityName(byte[] securityName)
public byte[] getSecurityName()
public void setSecurityLevel(int securityLevel)
public int getSecurityLevel()
public void setSecurityStateReference(SecurityStateReference securityStateReference)
public SecurityStateReference getSecurityStateReference()
public void setMsgID(MessageID msgID)
public void setMsgID(int msgID)
public MessageID getMsgID()
public void setMsgFlags(int msgFlags)
public int getMsgFlags()
public void setMaxSizeResponseScopedPDU(int maxSizeResponseScopedPDU)
public int getMaxSizeResponseScopedPDU()
public PduHandle getPduHandle()
public byte[] getSecurityEngineID()
public int getErrorCode()
public TransportMapping getTransportMapping()
public void setPduHandle(PduHandle pduHandle)
protected void updateRequestStatisticsPduHandle(PduHandle pduHandle)
public void setSecurityEngineID(byte[] securityEngineID)
public void setErrorCode(int errorCode)
public void setTransportMapping(TransportMapping transportMapping)
protected boolean isMatchingMessageID(MessageID msgID)
public boolean isMatchingMessageID(int msgID)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equalsExceptMsgID(StateReference other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void addMessageIDs(java.util.List<MessageID> msgIDs)
public java.util.List<MessageID> getMessageIDs()
protected MessageID createMessageID(int msgID)
Copyright © 2018 SNMP4J.org. All rights reserved.