Interface ConnectionInformation
-
@DoNotImplement public interface ConnectionInformation
The connection information contains specific data for the established connection of a client.- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull Optional<ClientTlsInformation>
getClientTlsInformation()
Information about TLS, should the client be connected to HiveMQ via an TLS listener.@NotNull ConnectionAttributeStore
getConnectionAttributeStore()
A store where client specific information can be stored for the duration of the connection.@NotNull Optional<InetAddress>
getInetAddress()
The client's IP address.@NotNull Optional<Listener>
getListener()
The listener of HiveMQ the client is connected to.@NotNull MqttVersion
getMqttVersion()
The MQTT version of the client.@NotNull Optional<ProxyInformation>
getProxyInformation()
The proxy protocol information for this connection.@NotNull Optional<TlsInformation>
getTlsInformation()
Deprecated.UsegetClientTlsInformation()
instead.
-
-
-
Method Detail
-
getMqttVersion
@NotNull MqttVersion getMqttVersion()
The MQTT version of the client.- Returns:
- The
MqttVersion
of the client. V_3_1, V_3_1_1 or V_5. - Since:
- 4.0.0, CE 2019.1
-
getInetAddress
@NotNull Optional<InetAddress> getInetAddress()
The client's IP address.- Returns:
- An
Optional
of theInetAddress
of the client. - Since:
- 4.0.0, CE 2019.1
-
getListener
@NotNull Optional<Listener> getListener()
The listener of HiveMQ the client is connected to.
-
getProxyInformation
@NotNull Optional<ProxyInformation> getProxyInformation()
The proxy protocol information for this connection. Only available if the proxy protocol is enabled.- Returns:
- An
Optional
of theProxyInformation
of the client. - Since:
- 4.0.0, CE 2019.1
-
getConnectionAttributeStore
@NotNull ConnectionAttributeStore getConnectionAttributeStore()
A store where client specific information can be stored for the duration of the connection.- Returns:
- The
ConnectionAttributeStore
of the client. - Since:
- 4.0.0, CE 2019.1
-
getTlsInformation
@Deprecated @NotNull Optional<TlsInformation> getTlsInformation()
Deprecated.UsegetClientTlsInformation()
instead.Information about TLS, should the client be connected to HiveMQ via an TLS listener. This information is only present if the client connected with mutual TLS.- Returns:
- An
Optional
of theTlsInformation
of the client. - Since:
- 4.0.0, CE 2019.1
-
getClientTlsInformation
@NotNull Optional<ClientTlsInformation> getClientTlsInformation()
Information about TLS, should the client be connected to HiveMQ via an TLS listener. This information is only present if the client connected with mutual TLS.- Returns:
- An
Optional
of theClientTlsInformation
of the client. - Since:
- 4.6.0, CE 2021.1
-
-