public class MqttClient extends CrtResource
Constructor and Description |
---|
MqttClient()
Creates a default MqttClient with no TLS and a
ClientBootstrap constructed with default settings |
MqttClient(ClientBootstrap clientBootstrap)
Creates an MqttClient with no TLS from the provided
ClientBootstrap |
MqttClient(ClientBootstrap clientBootstrap,
TlsContext context)
Creates an MqttClient from the provided
ClientBootstrap and TlsContext |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
TlsContext |
getTlsContext()
Gets the tls context used by all connections associated with this client.
|
protected void |
releaseNativeHandle()
Cleans up the native resources associated with this client.
|
acquireNativeHandle, addReferenceTo, close, collectNativeResources, getNativeHandle, isNativeResource, isNull, logNativeResources, releaseReferences, waitForNoResources
public MqttClient() throws CrtRuntimeException
ClientBootstrap
constructed with default settingsCrtRuntimeException
- @see software.amazon.awssdk.crt.io.ClientBootstrap#constructor(EventLoopGroup) @see software.amazon.awssdk.crt.io.EventLoopGroup#constructor(int)public MqttClient(ClientBootstrap clientBootstrap) throws CrtRuntimeException
ClientBootstrap
clientBootstrap
- The ClientBootstrap to useCrtRuntimeException
- If the system is unable to allocate space for a native MQTT client structurepublic MqttClient(ClientBootstrap clientBootstrap, TlsContext context) throws CrtRuntimeException
ClientBootstrap
and TlsContext
clientBootstrap
- The ClientBootstrap to usetlsContext
- the tls context to useCrtRuntimeException
- If the system is unable to allocate space for a native MQTT client structurepublic TlsContext getTlsContext()
protected void releaseNativeHandle()
releaseNativeHandle
in class CrtResource
protected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately
in class CrtResource
Copyright © 2019. All rights reserved.