@ProviderType
public interface CloudConnectionFactory
CloudConnectionFactory
is responsible to register CloudEndpoint
instances in the
framework.
The Component creates multiple component instances upon reception of a configuration
created through the Configuration Service.
It provides all the implementations that can be used to connect to a specific Cloud platform.
A CloudConnectionFactory
must create a CloudEndpoint
and, eventually, a
CloudConnectionManager
that are used to establish and manage the connection to a cloud platform, for example
an Mqtt connection.
Multiple CloudConnectionFactory
services can be registered in the framework to support multiple simultaneous
connections to different Cloud platforms.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KURA_CLOUD_CONNECTION_FACTORY_PID
The name of the property set in the instance configuration created
through
createConfiguration(java.lang.String) . |
Modifier and Type | Method and Description |
---|---|
void |
createConfiguration(java.lang.String pid)
This method creates a CloudEndpoint instance and, eventually, more service instances that are necessary to
identify and the manage the endpoint and the connection.
|
void |
deleteConfiguration(java.lang.String pid)
Deletes a previously created configuration deactivating the associated instances.
|
java.lang.String |
getFactoryPid()
Returns the factory PID of the OSGi Factory Component represented by this
CloudConnectionFactory . |
java.util.Set<java.lang.String> |
getManagedCloudConnectionPids()
Returns a set of
kura.service.pid that corresponds to the Cloud Endpoint services managed by this factory. |
java.util.List<java.lang.String> |
getStackComponentsPids(java.lang.String pid)
Returns the list of
kura.service.pid s that compose the cloud connection associated with the provided
kura.service.pid . |
static final java.lang.String KURA_CLOUD_CONNECTION_FACTORY_PID
createConfiguration(java.lang.String)
.
The property is set in the instance to relate it with the Factory that generated
the whole cloud stack.java.lang.String getFactoryPid()
CloudConnectionFactory
.void createConfiguration(java.lang.String pid) throws KuraException
kura.service.pid
property
set to the value provided in the pid
parameter.pid
- the Kura persistent identifier (kura.service.pid
) of the Cloud Endpoint service
instance created by this factory.KuraException
- an exception is thrown in case the creation operation failsjava.util.List<java.lang.String> getStackComponentsPids(java.lang.String pid) throws KuraException
kura.service.pid
s that compose the cloud connection associated with the provided
kura.service.pid
.pid
- the Kura persistent identifier, kura.service.pid
List
of kura.service.pid
s related to the provided pid
.KuraException
- if the specified kura.service.pid
is incorrect.void deleteConfiguration(java.lang.String pid) throws KuraException
pid
- the Kura persistent identifier, kura.service.pid
of a Cloud EndpointKuraException
- if the provided kura.service.pid
is incorrect or the delete operation fails.java.util.Set<java.lang.String> getManagedCloudConnectionPids() throws KuraException
kura.service.pid
that corresponds to the Cloud Endpoint services managed by this factory.KuraException