Module org.snmp4j
Package org.snmp4j

Class TransportStateReference

java.lang.Object
org.snmp4j.TransportStateReference
All Implemented Interfaces:
Serializable

public class TransportStateReference extends Object implements Serializable
The TransportStateReference class holds information defined by RFC 5343 for the tmStateReference ASI elements. Objects of this class are cached by security aware TransportMappings and transport aware SecurityModels.
Since:
2.0
Version:
2.0
Author:
Frank Fock
See Also:
  • Constructor Details

  • Method Details

    • setTransport

      public void setTransport(TransportMapping<?> transport)
    • getTransport

      public TransportMapping<?> getTransport()
    • getAddress

      public Address getAddress()
    • getSecurityName

      public OctetString getSecurityName()
    • getRequestedSecurityLevel

      public SecurityLevel getRequestedSecurityLevel()
    • getTransportSecurityLevel

      public SecurityLevel getTransportSecurityLevel()
    • isSameSecurity

      public boolean isSameSecurity()
    • getSessionID

      public Object getSessionID()
    • setSecurityName

      public void setSecurityName(OctetString securityName)
    • setRequestedSecurityLevel

      public void setRequestedSecurityLevel(SecurityLevel requestedSecurityLevel)
    • setTransportSecurityLevel

      public void setTransportSecurityLevel(SecurityLevel transportSecurityLevel)
    • setSameSecurity

      public void setSameSecurity(boolean sameSecurity)
    • getCertifiedIdentity

      public CertifiedIdentity getCertifiedIdentity()
      Deprecated.
      Use getTarget() instead and cast to CertifiedIdentity if possible.
      Get the CertifiedIdentity instance that contains additional security information necessary to send a message using TLSTM.
      Returns:
      the certified identity instance.
    • hasCertifiedIdentity

      public static boolean hasCertifiedIdentity(TransportStateReference transportStateReference)
      Check if the given TransportStateReference has CertifiedIdentity information.
      Parameters:
      transportStateReference - a transport state reference instance.
      Returns:
      true if transportStateReference is not null and its getTarget() is an instance of CertifiedIdentity.
      Since:
      3.4.0
    • getTarget

      public Target<?> getTarget()
      Get the target instance that contains additional security information necessary to send a message.
      Returns:
      associated (optional) target instance which has been used to send a message.
      Since:
      3.4.0
    • isTransportSecurityValid

      public boolean isTransportSecurityValid()
      Checks if transport, address, and transportSecurityLevel are valid (not null).
      Returns:
      true if the above fields are not null.
    • toString

      public String toString()
      Overrides:
      toString in class Object