See: Description
Interface | Description |
---|---|
AttachEndpointToUserCallback |
Callback interface for attached to user notifications.
Provide listener implementation to EndpointRegistrationManager to
retrieve notification when current endpoint is attached to user by another
endpoint. |
ChangedAttachedEndpointListCallback |
Callback interface for attached endpoint list change notifications
|
DetachEndpointFromUserCallback |
Callback interface for detached from user notifications.
Provide listener implementation to EndpointRegistrationManager to
retrieve notification when current endpoint is detached from user by another
endpoint. |
EndpointRegistrationManager |
Module that manages endpoint-initiated attaching and detaching endpoints
to (from) user.
To assign endpoints to user current endpoint has to be already attached, otherwise attach/detach operations will fail. Current endpoint can be attached to user in two ways: EndpointRegistrationManager.attachUser(String, String, UserAttachCallback)
Attached from another endpoint
Attaching current endpoint to user: |
EndpointRegistrationProcessor |
This processor that applies the endpoint registration
updates received from the remote server.
|
OnAttachEndpointOperationCallback |
Callback interface for attached endpoint notifications.
Use this interface to receive result of next operations: Attach endpoint to user by EndpointAccessToken
Once result from Operations server is received, listener is notified with string representation of operation name, result of the operation SyncResponseResultType
and additional data if available. |
OnDetachEndpointOperationCallback |
Callback interface for detached endpoint notifications.
Use this interface to receive result of next operations: Detach endpoint from user by EndpointKeyHash
Once result from Operations server is received, listener is notified with string representation of operation name, result of the operation SyncResponseResultType
and additional data if available. |
UserAttachCallback |
Retrieves result of user authentication
Use this listener to retrieve result of attaching current endpoint to user. |
Class | Description |
---|---|
DefaultEndpointRegistrationManager |
Default
EndpointRegistrationManager implementation. |
UserVerifierConstants |
Provides implementation of endpoint/user registration.
In order to have ability to send and (or) receive events an application must
be attached to the user entity in Kaa ecosystem. User registration module
gives API to manage endpoint-to-user attachments.
In scope of this java endpoint sdk provides next functionality:
If endpoint is assumed to be attached or detached by another application it
is possible to set up callback for notifications when this endpoint becomes
attached or detached.
All operations being described on this page are run in asynchronous mode. Thus,
in order to retrieve result for each operation an appropriate callback should be registered.
Attaching current endpoint to user:
EndpointRegistrationManager registrationManager = kaaClient.getEndpointRegistrationManager();
registrationManager.attachUser("userExternalId", "userAccessToken", new UserAuthResultListener() { ... });
To check if this endpoint is attached to user call EndpointRegistrationManager.isAttachedToUser()
.
EndpointRegistrationManager registrationManager = kaaClient.getEndpointRegistrationManager();
registrationManager.attachEndpoint(new EndpointAccessToken("accessToken"), new EndpointOperationResultListener() {...});
Detaching endpoint from user by its EndpointKeyHash
:
EndpointRegistrationManager registrationManager = kaaClient.getEndpointRegistrationManager();
registrationManager.detachEndpoint((new EndpointKeyHash("keyHash"), new EndpointOperationResultListener() {...});
EndpointKeyHash for endpoint can be received with AttachEndpoint operation
provided from Operations server. See org.kaaproject.kaa.client.event.registration.EndpointOperationCallback
. AttachEndpointToUserCallback
and DetachEndpointFromUserCallback
may be specified to receive notification about such event.Copyright © 2015. All rights reserved.