new MetadataResponse
MetadataResponse constructor. An instance of this class is passed as argument to an event listener, and must be used to respond to the remote adapter request, using the success method or the error method.
Method Summary
Method Detail
-
<inner> error
-
Sends an error response. The optional exception type parameter that can be used to issue a proper type of exceptiond depends on the event handled as described in the following table:
- init: "metadata"
- getItemData: none
- getUserItemData: none
- getSchema: "items" or "schema"
- getItems: "items"
- notifyUser: "access" or "credits"
- notifyUserAuth: "access" or "credits"
- notifyUserMessage: "credits" or "notification"
- notifyNewSession: "credits" or "conflictingSession" or "notification"
- notifySessionClose: "notification"
- notifyNewTables: "credits" or "notification"
- notifyTablesClose: "notification"
- notifyMpnDeviceAccess: "credits" or "notification"
- notifyMpnSubscriptionActivation: "credits" or "notification"
- notifyMpnDeviceTokenChange: "credits" or "notification"
Parameters:
Name Type Argument Description exceptionMessage
String exception message exceptionType
String <optional>
exception type -
<inner> success
-
Sends a successful response. Parameters that can be used depends on the event handled as described in the following table:
- init: success()
- getItemData: success([{distinctSnapLen: <distinct snapshot length>, minSourceFreq: <min source frequency>, allowedModes: {raw: <raw allowed>, merge: <merge allowed>, distinct: <distinct allowed>, command: <command allowed>}}, ...])
- getUserItemData: success([{allowedBufferSize: <allowed buffer size>, allowedMaxItemFreq: <allowed max item frequency>}, allowedModes: {raw: <raw allowed for user>, merge: <merge allowed for user>, distinct: <distinct allowed for user>, command: <command allowed for user>}}, ...])
- getSchema: success([<field 1>, <field 2>, ...])
- getItems: success([<item 1>, <item 2>, ...])
- notifyUser: success(<allowed max bandwidth>, <wants table notifications>)
- notifyUserAuth: success(<allowed max bandwidth>, <wants table notifications>)
- notifyUserMessage: success()
- notifyNewSession: success()
- notifySessionClose: success()
- notifyNewTables: success()
- notifyTablesClose: success()
- notifyMpnDeviceAccess: success()
- notifyMpnSubscriptionActivation: success()
- notifyMpnDeviceTokenChange: success()