public abstract class MetadataProviderAdapter extends java.lang.Object implements MetadataProvider
Constructor and Description |
---|
MetadataProviderAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
customizeUpdate(java.lang.String user,
java.lang.String item,
CustomizableItemEvent event)
Called by Lightstreamer Kernel in order to customize events pertaining
to an ItemEventBuffer, if such customization has been requested
through the enableUpdateCustomization method.
|
boolean |
enableUpdateCustomization(java.lang.String user,
java.lang.String item)
Called by Lightstreamer Kernel to know whether the Metadata Adapter
must or must not be given a chance to modify the values carried by the
updates for a supplied Item in a push Session owned by a supplied User.
|
int |
getAllowedBufferSize(java.lang.String user,
java.lang.String item)
Called by Lightstreamer Kernel to ask for the maximum allowed size
of the buffer internally used to enqueue subsequent ItemUpdates
for the same Item.
|
double |
getAllowedMaxBandwidth(java.lang.String user)
Called by Lightstreamer Kernel to ask for the bandwidth amount to be
allowed to a User for a push Session.
|
double |
getAllowedMaxItemFrequency(java.lang.String user,
java.lang.String item)
Called by Lightstreamer Kernel to ask for the ItemUpdate frequency
to be allowed to a User for a specific Item.
|
int |
getDistinctSnapshotLength(java.lang.String item)
Called by Lightstreamer Kernel to ask for the maximum allowed length
for a Snapshot of an Item that has been requested with publishing Mode
DISTINCT.
|
double |
getMinSourceFrequency(java.lang.String item)
Called by Lightstreamer Kernel 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(java.util.Map params,
java.io.File configDir)
No-op initialization.
|
boolean |
isModeAllowed(java.lang.String user,
java.lang.String item,
Mode mode)
Called by Lightstreamer Kernel to ask for the allowance of a publishing
Mode for an Item.
|
boolean |
isSelected(java.lang.String user,
java.lang.String item,
java.lang.String selector,
ItemEvent event)
Called by Lightstreamer Kernel in order to filter events pertaining
to an ItemEventBuffer, if the related Item was requested within a Table
(i.e.: Subscription) with an associated Selector.
|
boolean |
isSelectorAllowed(java.lang.String user,
java.lang.String item,
java.lang.String selector)
Called by Lightstreamer Kernel to ask for the allowance of a Selector
for an Item.
|
boolean |
modeMayBeAllowed(java.lang.String item,
Mode mode)
Called by Lightstreamer Kernel to ask for the allowance of a publishing
Mode for an Item (for at least one User).
|
void |
notifyMpnDeviceAccess(java.lang.String user,
MpnDeviceInfo device)
Called by Lightstreamer Kernel to check that a User is enabled to access
the specified MPN device.
|
void |
notifyMpnDeviceTokenChange(java.lang.String user,
MpnDeviceInfo device,
java.lang.String newDeviceToken)
Called by Lightstreamer Kernel to check that a User is enabled to change
the token of a MPN device.
|
void |
notifyMpnSubscriptionActivation(java.lang.String user,
java.lang.String sessionID,
TableInfo table,
MpnSubscriptionInfo mpnSubscription)
Called by Lightstreamer Kernel to check that a User is enabled
to activate a Push Notification subscription.
|
void |
notifyNewSession(java.lang.String user,
java.lang.String sessionID)
2-arguments version of the User authentication method.
|
void |
notifyNewSession(java.lang.String user,
java.lang.String sessionID,
java.util.Map clientContext)
Called by Lightstreamer Kernel to check that a User is enabled to open
a new push Session.
|
void |
notifyNewTables(java.lang.String user,
java.lang.String sessionID,
TableInfo[] tables)
Called by Lightstreamer Kernel to check that a User is enabled to add
some Tables (i.e.: Subscriptions) to a push Session.
|
void |
notifySessionClose(java.lang.String sessionID)
Called by Lightstreamer Kernel to notify the Metadata Adapter that
a push Session has been closed.
|
void |
notifyTablesClose(java.lang.String sessionID,
TableInfo[] tables)
Called by Lightstreamer Kernel to notify the Metadata Adapter that
some Tables (i.e.: Subscriptions) have been removed from a push Session.
|
void |
notifyUser(java.lang.String user,
java.lang.String password)
2-arguments version of the User authentication method.
|
void |
notifyUser(java.lang.String user,
java.lang.String password,
java.util.Map httpHeaders)
Called by Lightstreamer Kernel as a preliminary check that a user is
enabled to make Requests to the related Data Providers.
|
void |
notifyUser(java.lang.String user,
java.lang.String password,
java.util.Map httpHeaders,
java.lang.String clientPrincipal)
Extended version of the User authentication method, invoked by the
Server in case it 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(java.lang.String user,
java.lang.String sessionID,
java.lang.String message)
Called by Lightstreamer Kernel to forward a message received by a User.
|
boolean |
wantsTablesNotification(java.lang.String user)
Called by Lightstreamer Kernel 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(java.util.Map params, java.io.File configDir) throws MetadataProviderException
init
in interface MetadataProvider
params
- not used.configDir
- not used.MetadataProviderException
- never thrown.public void notifyUser(java.lang.String user, java.lang.String password, java.util.Map httpHeaders) throws AccessException, CreditsException
notifyUser
in interface MetadataProvider
user
- A User name.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 thrownCreditsException
- never thrownMetadataProvider.notifyUser(String, String, Map, String)
public void notifyUser(java.lang.String user, java.lang.String password) throws AccessException, CreditsException
user
- not used.password
- not used.AccessException
- never thrown.CreditsException
- never thrown.public void notifyUser(java.lang.String user, java.lang.String password, java.util.Map httpHeaders, java.lang.String clientPrincipal) throws AccessException, CreditsException
notifyUser
in interface MetadataProvider
user
- A User name.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 thrownCreditsException
- never thrownpublic double getAllowedMaxBandwidth(java.lang.String user)
getAllowedMaxBandwidth
in interface MetadataProvider
user
- not used.public double getAllowedMaxItemFrequency(java.lang.String user, java.lang.String item)
getAllowedMaxItemFrequency
in interface MetadataProvider
user
- not used.item
- not used.public int getAllowedBufferSize(java.lang.String user, java.lang.String item)
getAllowedBufferSize
in interface MetadataProvider
user
- not used.item
- not used.public boolean isModeAllowed(java.lang.String user, java.lang.String item, Mode mode)
isModeAllowed
in interface MetadataProvider
user
- not used.item
- not used.mode
- not used.public boolean modeMayBeAllowed(java.lang.String item, Mode mode)
modeMayBeAllowed
in interface MetadataProvider
item
- not used.mode
- not used.public boolean isSelectorAllowed(java.lang.String user, java.lang.String item, java.lang.String selector)
isSelectorAllowed
in interface MetadataProvider
user
- not used.item
- not used.selector
- not used.public boolean isSelected(java.lang.String user, java.lang.String item, java.lang.String selector, ItemEvent event)
isSelected
in interface MetadataProvider
user
- not used.item
- not used.selector
- not used.event
- not used.public boolean enableUpdateCustomization(java.lang.String user, java.lang.String item)
enableUpdateCustomization
in interface MetadataProvider
user
- not used.item
- not used.public void customizeUpdate(java.lang.String user, java.lang.String item, CustomizableItemEvent event)
customizeUpdate
in interface MetadataProvider
user
- not used.item
- not used.event
- not used.public double getMinSourceFrequency(java.lang.String item)
getMinSourceFrequency
in interface MetadataProvider
item
- not used.public int getDistinctSnapshotLength(java.lang.String item)
getDistinctSnapshotLength
in interface MetadataProvider
item
- An Item Name.public void notifyUserMessage(java.lang.String user, java.lang.String sessionID, java.lang.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(java.lang.String user, java.lang.String sessionID, java.util.Map clientContext) throws CreditsException, NotificationException
notifyNewSession
in interface MetadataProvider
user
- A User name.sessionID
- The ID of a new Session.clientContext
- not used.CreditsException
- never thrownNotificationException
- never thrownpublic void notifyNewSession(java.lang.String user, java.lang.String sessionID) throws CreditsException, NotificationException
user
- not used.sessionID
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifySessionClose(java.lang.String sessionID) throws NotificationException
notifySessionClose
in interface MetadataProvider
sessionID
- not used.NotificationException
- never thrown.public boolean wantsTablesNotification(java.lang.String user)
wantsTablesNotification
in interface MetadataProvider
user
- not used.public void notifyNewTables(java.lang.String user, java.lang.String sessionID, TableInfo[] tables) throws CreditsException, NotificationException
wantsTablesNotification(java.lang.String)
method is overridden,
this method will never be called by Lightstreamer Kernel.notifyNewTables
in interface MetadataProvider
user
- not used.sessionID
- not used.tables
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifyTablesClose(java.lang.String sessionID, TableInfo[] tables) throws NotificationException
wantsTablesNotification(java.lang.String)
method is overridden,
this method will never be called by Lightstreamer Kernel.notifyTablesClose
in interface MetadataProvider
sessionID
- not used.tables
- not used.NotificationException
- never thrown.public void notifyMpnDeviceAccess(java.lang.String user, MpnDeviceInfo device) throws CreditsException, NotificationException
notifyMpnDeviceAccess
in interface MetadataProvider
user
- not used.device
- not used.CreditsException
- never thrown.NotificationException
- never thrown.public void notifyMpnSubscriptionActivation(java.lang.String user, java.lang.String sessionID, TableInfo table, 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(java.lang.String user, MpnDeviceInfo device, java.lang.String newDeviceToken) throws CreditsException, NotificationException
notifyMpnDeviceTokenChange
in interface MetadataProvider
user
- not used.device
- not used.newDeviceToken
- not used.CreditsException
- never thrown.NotificationException
- never thrown.