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 from the provided
ClientBootstrap with no TLS |
MqttClient(ClientBootstrap clientBootstrap,
TlsContext tlsContext)
Creates an MqttClient from the provided
ClientBootstrap and TlsContext |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up the native resources associated with this client.
|
TlsContext |
tlsContext()
Get the
TlsContext associated with this client |
acquire, getAllocatedNativeResourceCount, getAllocatedNativeResources, isNull, native_ptr, own, release
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
with no TLSclientBootstrap
- The ClientBootstrap to useCrtRuntimeException
- If the system is unable to allocate space for a native MQTT client structurepublic MqttClient(ClientBootstrap clientBootstrap, TlsContext tlsContext) throws CrtRuntimeException
ClientBootstrap
and TlsContext
clientBootstrap
- The ClientBootstrap to usetlsContext
- The TlsContext to useCrtRuntimeException
- If the system is unable to allocate space for a native MQTT client structurepublic void close()
close
in interface AutoCloseable
close
in class CrtResource
public TlsContext tlsContext()
TlsContext
associated with this clientCopyright © 2019. All rights reserved.