public interface ClientData
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<SslClientCertificate> |
getCertificate() |
String |
getClientId() |
ConnectionAttributeStore |
getConnectionAttributeStore()
Returns the
ConnectionAttributeStore for the connected client. |
com.google.common.base.Optional<Long> |
getDisconnectTimestamp()
Returns optional
Long that contains the disconnect timestamp. |
com.google.common.base.Optional<InetAddress> |
getInetAddress() |
com.google.common.base.Optional<Listener> |
getListener()
Returns the listener the client connected to.
|
com.google.common.base.Optional<ProxyInformation> |
getProxyInformation()
Returns optional
ProxyInformation that contains information from
the PROXY protocol. |
com.google.common.base.Optional<String> |
getUsername() |
boolean |
isAnonymous() |
boolean |
isAuthenticated() |
boolean |
isBridge() |
String getClientId()
com.google.common.base.Optional<String> getUsername()
Optional with the username which was provided in the MQTT CONNECT message.boolean isAuthenticated()
true if the client is authenticated, false otherwisecom.google.common.base.Optional<SslClientCertificate> getCertificate()
Optional of a SslClientCertificate which was provided at transport level client
certificate authentication.boolean isAnonymous()
true if the client is anonymous. That means the client is not authenticatedboolean isBridge()
true if this client is a bridge.com.google.common.base.Optional<InetAddress> getInetAddress()
Optional of the clients IP address as InetAddresscom.google.common.base.Optional<Listener> getListener()
If the client is connected locally, the listener will always be available.
If the ClientData belongs to another cluster node, the listener may be absent.
Optional of the Listener the client connected to.TcpListener,
TlsTcpListener,
WebsocketListener,
TlsWebsocketListener,
Listenerscom.google.common.base.Optional<ProxyInformation> getProxyInformation()
ProxyInformation that contains information from
the PROXY protocol.
This is only useful if a load balancer is in front of the HiveMQ instance
and the Listener that is used by the load balancer has the PROXY protocol enabled.
You can check this via Listener.isProxyProtocolSupported().
Besides original source information, HiveMQ supports TLVs as specified in the PROXY protocol spec.
Optional of the ProxyInformation.@NotNull ConnectionAttributeStore getConnectionAttributeStore()
ConnectionAttributeStore for the connected client.
If the ClientData object was acquired through the AsyncClientService
or the BlockingClientService, its required to call
ConnectionAttributeStore.isAccessible() before using the ConnectionAttributeStore
ConnectionAttributeStore for the connected client.Copyright © 2013-2018 dc-square GmbH. All Rights Reserved.