java.lang.Object
org.snmp4j.TransportStateReference
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionTransportStateReference(TransportMapping<?> transport, Address address, OctetString securityName, SecurityLevel requestedSecurityLevel, SecurityLevel transportSecurityLevel, boolean sameSecurity, Object sessionID) TransportStateReference(TransportMapping<?> transport, Address address, OctetString securityName, SecurityLevel requestedSecurityLevel, SecurityLevel transportSecurityLevel, boolean sameSecurity, Object sessionID, Target<?> target) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Target<?> Get the target instance that contains additional security information necessary to send a message.static booleanhasCertifiedIdentity(TransportStateReference transportStateReference) Check if the givenTransportStateReferencehasCertifiedIdentityinformation.booleanbooleanChecks if transport, address, and transportSecurityLevel are valid (not null).voidsetRequestedSecurityLevel(SecurityLevel requestedSecurityLevel) voidsetSameSecurity(boolean sameSecurity) voidsetSecurityName(OctetString securityName) voidsetTransport(TransportMapping<?> transport) voidsetTransportSecurityLevel(SecurityLevel transportSecurityLevel) toString()
-
Constructor Details
-
TransportStateReference
public TransportStateReference(TransportMapping<?> transport, Address address, OctetString securityName, SecurityLevel requestedSecurityLevel, SecurityLevel transportSecurityLevel, boolean sameSecurity, Object sessionID) -
TransportStateReference
public TransportStateReference(TransportMapping<?> transport, Address address, OctetString securityName, SecurityLevel requestedSecurityLevel, SecurityLevel transportSecurityLevel, boolean sameSecurity, Object sessionID, Target<?> target)
-
-
Method Details
-
setTransport
-
getTransport
-
getAddress
-
getSecurityName
-
getRequestedSecurityLevel
-
getTransportSecurityLevel
-
isSameSecurity
public boolean isSameSecurity() -
getSessionID
-
setSecurityName
-
setRequestedSecurityLevel
-
setTransportSecurityLevel
-
setSameSecurity
public void setSameSecurity(boolean sameSecurity) -
getCertifiedIdentity
Deprecated.UsegetTarget()instead and cast toCertifiedIdentityif possible.Get theCertifiedIdentityinstance that contains additional security information necessary to send a message usingTLSTM.- Returns:
- the certified identity instance.
-
hasCertifiedIdentity
Check if the givenTransportStateReferencehasCertifiedIdentityinformation.- Parameters:
transportStateReference- a transport state reference instance.- Returns:
trueiftransportStateReferenceis notnulland itsgetTarget()is an instance ofCertifiedIdentity.- Since:
- 3.4.0
-
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:
trueif the above fields are notnull.
-
toString
-
getTarget()instead and cast toCertifiedIdentityif possible.