Package fr.codinbox.connector.velocity
Class Connector
java.lang.Object
fr.codinbox.connector.velocity.Connector
Static service locator for accessing connector services on the Velocity platform.
This class provides global access to all four connector services. Services are
initialized by the Velocity ConnectorPlugin at startup and should not be set externally.
Usage example:
RedisConnectorService redis = Connector.getRedisService();
DatabaseConnectorService db = Connector.getDatabaseService();
RabbitMQConnectorService rabbit = Connector.getRabbitMQService();
KafkaConnectorService kafka = Connector.getKafkaService();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull DatabaseConnectorServiceReturns the database connector service.static @NotNull KafkaConnectorServiceReturns the Kafka connector service.static @NotNull RabbitMQConnectorServiceReturns the RabbitMQ connector service.static @NotNull RedisConnectorServiceReturns the Redis connector service.protected static voidprotected static voidsetKafkaService(@NotNull KafkaConnectorService service) protected static voidprotected static voidsetRedisService(@NotNull RedisConnectorService service)
-
Constructor Details
-
Connector
public Connector()
-
-
Method Details
-
getDatabaseService
Returns the database connector service.- Returns:
- the initialized
DatabaseConnectorService - Throws:
NullPointerException- if the service has not been initialized
-
getRedisService
Returns the Redis connector service.- Returns:
- the initialized
RedisConnectorService - Throws:
NullPointerException- if the service has not been initialized
-
getRabbitMQService
Returns the RabbitMQ connector service.- Returns:
- the initialized
RabbitMQConnectorService - Throws:
NullPointerException- if the service has not been initialized
-
getKafkaService
Returns the Kafka connector service.- Returns:
- the initialized
KafkaConnectorService - Throws:
NullPointerException- if the service has not been initialized
-
setDatabaseService
-
setRedisService
-
setRabbitMQService
-
setKafkaService
-