Class KafkaConnectorMetadataAdapter
java.lang.Object
com.lightstreamer.interfaces.metadata.MetadataProviderAdapter
com.lightstreamer.adapters.metadata.LiteralBasedProvider
com.lightstreamer.kafka.adapters.pub.KafkaConnectorMetadataAdapter
- All Implemented Interfaces:
MetadataProvider
Implementation of a Lightstreamer Metadata Adapter for Lightstreamer Kafka Connector.
For the sake of simplicity, this documentation shows only the hook methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onSubscription
(String user, String sessionID, TableInfo[] tables) Hook method invoked by Lightstreamer Kernel to notify that a user has submitted a Subscription.void
onUnsubscription
(String sessionID, TableInfo[] tables) Hook method invoked by Lightstreamer Kernel to notify that a Subscription has been removed from a push session.protected void
Hook method invoked by Lightstreamer Kernel after the initialization phase of the Kafka Connector Metadata Adapter has been completed.Methods inherited from class com.lightstreamer.adapters.metadata.LiteralBasedProvider
getAllowedBufferSize, getAllowedBufferSize, getAllowedMaxBandwidth, getAllowedMaxItemFrequency, getAllowedMaxItemFrequency, getDistinctSnapshotLength, getDistinctSnapshotLength, getItems, getItems, getItems, getMinSourceFrequency, getMinSourceFrequency, getSchema, getSchema, getSchema, modeMayBeAllowed, modeMayBeAllowed, notifyUser, notifyUser
Methods inherited from class com.lightstreamer.interfaces.metadata.MetadataProviderAdapter
customizeUpdate, customizeUpdate, enableUpdateCustomization, enableUpdateCustomization, isModeAllowed, isModeAllowed, isSelected, isSelected, isSelectorAllowed, isSelectorAllowed, notifyMpnDeviceAccess, notifyMpnDeviceTokenChange, notifyMpnSubscriptionActivation, notifyNewSession, notifyNewSession, notifySessionClose, notifyUserMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lightstreamer.interfaces.metadata.MetadataProvider
getSessionTimeToLive, setListener
-
Constructor Details
-
KafkaConnectorMetadataAdapter
public KafkaConnectorMetadataAdapter()
-
-
Method Details
-
postInit
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 theparam
elements supplied in the KafkaConnector configuration file under the<metadata_provider>
elementconfigDir
- 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 namesessionID
- the ID of a session owned by the usertables
- 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 SubscriptionNotificationException
- if something is wrong in the parameters, such as thesessionID
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 usertables
- 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 thesessionID
of a session that is not currently open or inconsistent information about the Subscription- See Also:
-