Classes

interface MigratoryDataEntitlementListener

Process authorization requests.

Thread safety

The methods exposed by this interface are always called from the same thread.

Public Functions

void onSubscribe(MigratoryDataSubscribeRequest req)

Process a subscribe authorization request.

Parameters
  • req: the subscribe authorization request

void onPublish(MigratoryDataPublishRequest req)

Process a publish authorization request.

Parameters
  • req: the publish authorization request

interface ClientCredentials

Provide the credentials of the client which makes the authorization request.

Public Functions

String getToken()

Provides the entitlement token of the client.

The value returned by this method is the entitlement token assigned to the client with the client API method MigratoryDataClient.setEntitlementToken(String).

Return

the entitlement token of the client

String getClientAddress()

Provides the IP address of the client.

Return

the IP address of the client

Map<String, Object> getAdditionalInfo()

Get additional attributes about the client as key/value pairs.

No additional attributes are currently available.

Return

a map with additional attributes

interface MigratoryDataPublishRequest

Represent a publish authorization request.

Public Functions

ClientCredentials getClientCredentials()

Provides the credentials of the client.

Return

the credentials of the client

String getSubject()

Provides the subject of the message to be authorized for publication.

Return

the subject of the message to be published

void setAllowed(boolean allowed)

Allows or denies the publish authorization request.

Parameters

void sendResponse()

Send the response for authorization request back to the server to allow or deny the publish.

This method must be called after the publish has been authorized using the method MigratoryDataPublishRequest.setAllowed().

interface MigratoryDataSubscribeRequest

Represent a subscribe authorization request.

Public Functions

ClientCredentials getClientCredentials()

Provides the credentials of the client.

Return

the credentials of the client

List<String> getSubjects()

Provides the list of subjects to be authorized for subscription.

Return

the subjects to be subscribed

void setAllowed(String subject, boolean allowed)

Allows or denies the subscribe authorization request.

This method should be used to authorize the subscription for each subject of the list provided by MigratoryDataSubscribeRequest.getSubjects().

Parameters

void sendResponse()

Send the response for the authorization request back to the server to allow or deny the subscribed subjects.

This method must be called after the subjects have been authorized using the method MigratoryDataSubscribeRequest.setAllowed()..