public class StateReference 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.Constructor and 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.
|
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(int msgID)
public int 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)
public void setSecurityEngineID(byte[] securityEngineID)
public void setErrorCode(int errorCode)
public void setTransportMapping(TransportMapping transportMapping)
public boolean isMatchingMessageID(int msgID)
public boolean equalsExceptMsgID(StateReference other)
Copyright © 2017 SNMP4J.org. All rights reserved.