public abstract class MetadataProviderAdapter extends Object implements MetadataProvider
Constructor and Description |
---|
MetadataProviderAdapter() |
Modifier and Type | Method and Description |
---|---|
int |
getAllowedBufferSize(String user,
String item)
Called by Lightstreamer Kernel through the Remote Server to ask for the maximum allowed size
of the buffer internally used to enqueue subsequent ItemUpdates
for the same Item.
|
double |
getAllowedMaxBandwidth(String user)
Called by Lightstreamer Kernel through the Remote Server to ask
for the bandwidth amount to be allowed to a User for a push Session.
|
double |
getAllowedMaxItemFrequency(String user,
String item)
Called by Lightstreamer Kernel through the Remote Server to ask for the ItemUpdate frequency
to be allowed to a User for a specific Item.
|
int |
getDistinctSnapshotLength(String item)
Called by Lightstreamer Kernel through the Remote Server to ask for the maximum allowed length
for a Snapshot of an Item that has been requested with publishing Mode
DISTINCT.
|
double |
getMinSourceFrequency(String item)
Called by Lightstreamer Kernel through the Remote Server to ask for the minimum ItemEvent
frequency from the supplier Data Adapter at which the events for an Item are
guaranteed to be delivered to the Clients without loss of information.
|
void |
init(Map<String,String> parameters,
String configFile)
No-op initialization.
|
boolean |
isModeAllowed(String user,
String item,
Mode mode)
Called by Lightstreamer Kernel through the Remote Server to ask for the allowance of a publishing
Mode for an Item.
|
boolean |
modeMayBeAllowed(String item,
Mode mode)
Called by Lightstreamer Kernel through the Remote Server to ask for the allowance of a publishing
Mode for an Item (for at least one User).
|
void |
notifyMpnDeviceAccess(String user,
String sessionID,
MpnDeviceInfo device)
Called by Lightstreamer Kernel through the Remote Server to check that a User is enabled to access
the specified MPN device.
|
void |
notifyMpnDeviceTokenChange(String user,
String sessionID,
MpnDeviceInfo device,
String newDeviceToken)
Called by Lightstreamer Kernel through the Remote Server to check that a User is enabled to change
the token of a MPN device.
|
void |
notifyMpnSubscriptionActivation(String user,
String sessionID,
TableInfo table,
MpnSubscriptionInfo mpnSubscription)
Called by Lightstreamer Kernel through the Remote Server to check that a User is enabled
to activate a Push Notification subscription.
|
void |
notifyNewSession(String user,
String sessionID,
Map<String,String> clientContext)
Called by Lightstreamer Kernel through the Remote Server to check that a User is enabled to open
a new push Session.
|
void |
notifyNewTables(String user,
String sessionID,
TableInfo[] tables)
Called by Lightstreamer Kernel through the Remote Server to check that a User is enabled to add
some Tables (i.e.: Subscriptions) to a push Session.
|
void |
notifySessionClose(String sessionID)
Called by Lightstreamer Kernel through the Remote Server to notify the Metadata Adapter that
a push Session has been closed.
|
void |
notifyTablesClose(String sessionID,
TableInfo[] tables)
Called by Lightstreamer Kernel through the Remote Server to notify the Metadata Adapter that
some Tables (i.e.: Subscriptions) have been removed from a push Session.
|
void |
notifyUser(String user,
String password,
Map<String,String> httpHeaders)
Called by Lightstreamer Kernel through the Remote Server as a preliminary check that a user is
enabled to make Requests to the related Data Providers.
|
void |
notifyUser(String user,
String password,
Map<String,String> httpHeaders,
String clientPrincipal)
Extended version of the User authentication method, invoked by the
Server, through the Remote Server, in case the Server has been instructed (through the
<use_client_auth> configuration flag) to acquire the client principal from the client TLS/SSL
certificate, if available.
|
void |
notifyUserMessage(String user,
String sessionID,
String message)
Called by Lightstreamer Kernel through the Remote Server to forward a message received by a User.
|
boolean |
wantsTablesNotification(String user)
Called by Lightstreamer Kernel through the Remote Server to know whether the Metadata Adapter
must or must not be notified any time a Table (i.e.: Subscription)
is added or removed from a push Session owned by a supplied User.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItems, getSchema
public void init(@Nonnull Map<String,String> parameters, @Nullable String configFile) throws MetadataProviderException
init
in interface MetadataProvider
parameters
- not used.configFile
- not used.MetadataProviderException
- never thrown.public void notifyUser(@Nullable String user, @Nullable String password, @Nonnull Map<String,String> httpHeaders) throws AccessException, CreditsException
notifyUser
in interface MetadataProvider
user
- A User name. Not used.password
- A password optionally required to validate the User.httpHeaders
- A Map-type value object that contains a name-value
pair for each header found in the HTTP request that originated the call.
Not used.AccessException
- never thrown.CreditsException
- never thrown.MetadataProvider.notifyUser(String, String, Map, String)
public void notifyUser(@Nullable String user, @Nullable String password, @Nonnull Map<String,String> httpHeaders, @Nullable String clientPrincipal) throws AccessException, CreditsException
notifyUser
in interface MetadataProvider
user
- A User name. Not used.password
- A password optionally required to validate the User.httpHeaders
- A Map-type value object that contains a name-value
pair for each header found in the HTTP request that originated the call.clientPrincipal
- the identification name reported in the client
TLS/SSL certificate supplied on the socket connection used to issue the
request that originated the call; it can be null if client has not
authenticated itself or the authentication has failed. Not used.AccessException
- never thrown.CreditsException
- never thrown.MetadataProvider.notifyUser(String, String, Map, String)
public double getAllowedMaxBandwidth(@Nullable String user)
getAllowedMaxBandwidth
in interface MetadataProvider
user
- not used.public double getAllowedMaxItemFrequency(@Nullable String user, @Nonnull String item)
getAllowedMaxItemFrequency
in interface MetadataProvider
user
- not used.item
- not used.public int getAllowedBufferSize(@Nullable String user, @Nonnull String item)
getAllowedBufferSize
in interface MetadataProvider
user
- not used.item
- not used.public boolean isModeAllowed(@Nullable String user, @Nonnull String item, @Nonnull Mode mode)
isModeAllowed
in interface MetadataProvider
user
- not used.item
- not used.mode
- not used.public boolean modeMayBeAllowed(@Nonnull String item, @Nonnull Mode mode)
modeMayBeAllowed
in interface MetadataProvider
item
- not used.mode
- not used.public double getMinSourceFrequency(@Nonnull String item)
getMinSourceFrequency
in interface MetadataProvider
item
- not used.public int getDistinctSnapshotLength(@Nonnull String item)
getDistinctSnapshotLength
in interface MetadataProvider
item
- not used.public void notifyUserMessage(@Nullable String user, @Nonnull String sessionID, @Nonnull String message) throws CreditsException, NotificationException
notifyUserMessage
in interface MetadataProvider
user
- not used.sessionID
- not used.message
- not used.CreditsException
- always thrown.NotificationException
- never thrown.public void notifyNewSession(@Nullable String user, @Nonnull String sessionID, @Nonnull Map<String,String> clientContext) throws CreditsException, NotificationException
notifyNewSession
in interface MetadataProvider
user
- not used.sessionID
- not used.clientContext
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifySessionClose(@Nonnull String sessionID) throws NotificationException
notifySessionClose
in interface MetadataProvider
sessionID
- not used.NotificationException
- never thrown.public boolean wantsTablesNotification(@Nullable String user)
wantsTablesNotification
in interface MetadataProvider
user
- not used.public void notifyNewTables(@Nullable String user, @Nonnull String sessionID, @Nonnull TableInfo[] tables) throws CreditsException, NotificationException
wantsTablesNotification(java.lang.String)
method is overridden,
this method will never be called.notifyNewTables
in interface MetadataProvider
user
- not used.sessionID
- not used.tables
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifyTablesClose(@Nonnull String sessionID, @Nonnull TableInfo[] tables) throws NotificationException
wantsTablesNotification(java.lang.String)
method is overridden,
this method will never be called.notifyTablesClose
in interface MetadataProvider
sessionID
- not used.tables
- not used.NotificationException
- never thrown.public void notifyMpnDeviceAccess(@Nullable String user, @Nonnull String sessionID, @Nonnull MpnDeviceInfo device) throws CreditsException, NotificationException
notifyMpnDeviceAccess
in interface MetadataProvider
user
- not used.sessionID
- not used.device
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifyMpnSubscriptionActivation(@Nullable String user, @Nonnull String sessionID, @Nonnull TableInfo table, @Nonnull MpnSubscriptionInfo mpnSubscription) throws CreditsException, NotificationException
notifyMpnSubscriptionActivation
in interface MetadataProvider
user
- not used.sessionID
- not used.table
- not used.mpnSubscription
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifyMpnDeviceTokenChange(@Nullable String user, @Nonnull String sessionID, @Nonnull MpnDeviceInfo device, @Nonnull String newDeviceToken) throws CreditsException, NotificationException
notifyMpnDeviceTokenChange
in interface MetadataProvider
user
- not used.sessionID
- not used.device
- not used.newDeviceToken
- not used.CreditsException
- never thrown.NotificationException
- never thrown.Copyright © 2021. All rights reserved.