Package org.correomqtt.business.utils
Class ConnectionHolder
- java.lang.Object
-
- org.correomqtt.business.utils.ConnectionHolder
-
- All Implemented Interfaces:
ApplicationLifecycleObserver,BaseObserver
public class ConnectionHolder extends Object implements ApplicationLifecycleObserver
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CorreoMqttClientgetClient(String connectionId)ConnectionConfigDTOgetConfig(String connectionId)CorreoMqttConnectiongetConnection(String connectionId)Map<String,CorreoMqttConnection>getConnections()static ConnectionHoldergetInstance()List<ConnectionConfigDTO>getSortedConnections()booleanisConnectionUnused(ConnectionConfigDTO config)voidonShutdown()voidrefresh()
-
-
-
Method Detail
-
getInstance
public static ConnectionHolder getInstance()
-
refresh
public void refresh()
-
getConnection
public CorreoMqttConnection getConnection(String connectionId)
-
getClient
public CorreoMqttClient getClient(String connectionId)
-
getConfig
public ConnectionConfigDTO getConfig(String connectionId)
-
isConnectionUnused
public boolean isConnectionUnused(ConnectionConfigDTO config)
-
getConnections
public Map<String,CorreoMqttConnection> getConnections()
-
onShutdown
public void onShutdown()
- Specified by:
onShutdownin interfaceApplicationLifecycleObserver
-
getSortedConnections
public List<ConnectionConfigDTO> getSortedConnections()
-
-