public class StateReference<A extends Address> extends Object implements 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 and Description |
---|---|
protected List<MessageID> |
retryMsgIDs |
Constructor and Description |
---|
StateReference()
Default constructor.
|
StateReference(int msgID,
int msgFlags,
int maxSizeResponseScopedPDU,
PduHandle pduHandle,
A peerAddress,
TransportMapping<? super A> 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,
A peerAddress,
TransportMapping<? super A> peerTransport,
SecurityModel secModel,
byte[] secName,
int errorCode)
Creates a state reference for community based security models.
|
public StateReference()
public StateReference(PduHandle pduHandle, A peerAddress, TransportMapping<? super A> 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, A peerAddress, TransportMapping<? super A> 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 A getAddress()
public void setAddress(A 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<? super A> 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<? super A> transportMapping)
protected boolean isMatchingMessageID(MessageID msgID)
public boolean isMatchingMessageID(int msgID)
public boolean equalsExceptMsgID(StateReference<?> other)
public static MessageID createMessageID(int msgID)
Copyright © 2021 SNMP4J.org. All rights reserved.