Interface ExtensionMain
-
public interface ExtensionMain
The main starting point for each HiveMQ extension.Each extension must implement at least this interface. The implementation of this interface is used by HiveMQ to load and enable/disable an extension.
- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
extensionStart(@NotNull ExtensionStartInput extensionStartInput, @NotNull ExtensionStartOutput extensionStartOutput)
This method is called by HiveMQ if an extension is enabled.void
extensionStop(@NotNull ExtensionStopInput extensionStopInput, @NotNull ExtensionStopOutput extensionStopOutput)
This method is called by HiveMQ if an extension is disabled.
-
-
-
Method Detail
-
extensionStart
void extensionStart(@NotNull ExtensionStartInput extensionStartInput, @NotNull ExtensionStartOutput extensionStartOutput)
This method is called by HiveMQ if an extension is enabled.It can be used to setup the extension and register client interceptors and callbacks with HiveMQ.
If this method returns HiveMQ assumes that this extension is finished starting up.
There are multiple options when this method can be called by HiveMQ:
- When HiveMQ starts up
- When the extension is enabled at runtime due to an administrative action
ExtensionStartOutput.preventExtensionStartup(String)
.CAUTION: since 4.4.1, CE 2020.5: This method blocks the HiveMQ start. Please make sure that your implementation will always return.
- Parameters:
extensionStartInput
- AExtensionStartInput
.extensionStartOutput
- AExtensionStartOutput
.- Since:
- 4.0.0, CE 2019.1
-
extensionStop
void extensionStop(@NotNull ExtensionStopInput extensionStopInput, @NotNull ExtensionStopOutput extensionStopOutput)
This method is called by HiveMQ if an extension is disabled.It can be used to shut down the extension.
Interceptor
s,Authorizer
andAuthenticator
from this extension are automatically de-registered by HiveMQ and do not need to be de-registered manually.If this method returns HiveMQ assumes that this extension is finished shutting down.
There are multiple options when this method can be called by HiveMQ:
- When HiveMQ shuts down
- When the extension is disabled at runtime due to an administrative action
- Parameters:
extensionStopInput
- AExtensionStartInput
extensionStopOutput
- AExtensionStartOutput
- Since:
- 4.0.0, CE 2019.1
-
-