public interface EndpointRegistrationManager
attachUser(String, String, UserAttachCallback)
EndpointRegistrationManager registrationManager = kaaClient.getEndpointRegistrationManager();
registrationManager.attachUser("userExternalId", "userAccessToken", new UserAuthResultListener() { ... });
To check if this endpoint is attached to user call isAttachedToUser()
.
Only attached endpoints can send/receive events.
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 OnAttachEndpointOperationCallback
. AttachEndpointToUserCallback
and DetachEndpointFromUserCallback
may be specified to receive notification about such event.UserTransport
to communicate with Operations
server in scope of basic functionality and ProfileTransport
when its
access token is changed.Modifier and Type | Method and Description |
---|---|
void |
attachEndpoint(EndpointAccessToken endpointAccessToken,
OnAttachEndpointOperationCallback resultListener)
Updates with new endpoint attach request
OnAttachEndpointOperationCallback is populated with EndpointKeyHash of an
attached endpoint. |
void |
attachUser(String userVerifierToken,
String userExternalId,
String userAccessToken,
UserAttachCallback callback)
Creates user attach request using specified verifier.
|
void |
attachUser(String userExternalId,
String userAccessToken,
UserAttachCallback callback)
Creates user attach request using default verifier.
|
void |
detachEndpoint(EndpointKeyHash endpointKeyHash,
OnDetachEndpointOperationCallback resultListener)
Updates with new endpoint detach request
|
boolean |
isAttachedToUser()
Checks if current endpoint is attached to user.
|
void |
setAttachedCallback(AttachEndpointToUserCallback callback)
Sets callback for notifications when current endpoint is attached to user
|
void |
setDetachedCallback(DetachEndpointFromUserCallback callback)
Sets callback for notifications when current endpoint is detached from user
|
void attachEndpoint(EndpointAccessToken endpointAccessToken, OnAttachEndpointOperationCallback resultListener)
OnAttachEndpointOperationCallback
is populated with EndpointKeyHash
of an
attached endpoint.endpointAccessToken
- Access token of the attaching endpointresultListener
- Listener to notify about result of the endpoint attachingEndpointAccessToken
,
OnAttachEndpointOperationCallback
void detachEndpoint(EndpointKeyHash endpointKeyHash, OnDetachEndpointOperationCallback resultListener)
endpointKeyHash
- Key hash of the detaching endpointresultListener
- Listener to notify about result of the enpoint attachingEndpointKeyHash
,
OnDetachEndpointOperationCallback
void attachUser(String userExternalId, String userAccessToken, UserAttachCallback callback)
userExternalId
- userAccessToken
- callback
- called when authentication result receivedUserAttachCallback
void attachUser(String userVerifierToken, String userExternalId, String userAccessToken, UserAttachCallback callback)
userVerifierToken
- userExternalId
- userAccessToken
- callback
- called when authentication result receivedUserAttachCallback
boolean isAttachedToUser()
void setAttachedCallback(AttachEndpointToUserCallback callback)
callback
- AttachEndpointToUserCallback
void setDetachedCallback(DetachEndpointFromUserCallback callback)
callback
- DetachEndpointFromUserCallback
Copyright © 2015. All rights reserved.