Class KafkaConnectorMetadataAdapter

All Implemented Interfaces:
MetadataProvider

public class KafkaConnectorMetadataAdapter extends LiteralBasedProvider
Implementation of a Lightstreamer Metadata Adapter for Lightstreamer Kafka Connector.

For the sake of simplicity, this documentation shows only the hook methods.

  • Constructor Details

    • KafkaConnectorMetadataAdapter

      public KafkaConnectorMetadataAdapter()
  • Method Details

    • postInit

      protected void postInit(Map params, File configDir) throws MetadataProviderException
      Hook method invoked by Lightstreamer Kernel after the initialization phase of the Kafka Connector Metadata Adapter has been completed.
      Parameters:
      params - a Map-type value object that contains name-value pairs corresponding to the param elements supplied in the KafkaConnector configuration file under the <metadata_provider> element
      configDir - the path of the directory on the local disk where the KafkaConnector configuration file resides
      Throws:
      MetadataProviderException - if an error occurs that prevents the correct behavior of the Metadata Adapter. This causes the Server not to complete the startup and to exit.
      See Also:
    • onSubscription

      public void onSubscription(@Nullable String user, @Nonnull String sessionID, @Nonnull TableInfo[] tables) throws CreditsException, NotificationException
      Hook method invoked by Lightstreamer Kernel to notify that a user has submitted a Subscription.

      In this default implementation, the KafkaConnector Metadata Adapter does nothing.

      Parameters:
      user - a user name
      sessionID - the ID of a session owned by the user
      tables - an array of TableInfo instances, each of them containing the details of a Subscription to be added to the session
      Throws:
      CreditsException - if the user is not allowed to submit the Subscription
      NotificationException - if something is wrong in the parameters, such as the sessionID of a session that is not currently open or inconsistent information about the Subscription
      See Also:
    • onUnsubscription

      public void onUnsubscription(@Nonnull String sessionID, @Nonnull TableInfo[] tables) throws NotificationException
      Hook method invoked by Lightstreamer Kernel to notify that a Subscription has been removed from a push session.

      In this default implementation, the KafkaConnector Metadata Adapter does nothing.

      Parameters:
      sessionID - the ID of a session owned by the user
      tables - an array of TableInfo instances, each of them containing the details of a Subscription that has been removed from the session
      Throws:
      NotificationException - if something is wrong in the parameters, such as the sessionID of a session that is not currently open or inconsistent information about the Subscription
      See Also: