public interface ClientEndpoint extends Client
Modifier and Type | Method and Description |
---|---|
void |
addDestroyAction(String registrationId,
Callable<Boolean> removeAction)
Adds a remove callable to be called when endpoint is destroyed
Note: removeDestroyAction should be called when there is no need to destroy action anymore.
|
void |
addListenerDestroyAction(String service,
String topic,
String id)
Adds a remove callable to be called when endpoint is destroyed to clean related listener
Following line will be called when endpoint destroyed :
eventService.deregisterListener(service, topic, id);
Note: removeDestroyAction should be called when there is no need to destroy action anymore.
|
void |
authenticated(ClientPrincipal principal) |
void |
authenticated(ClientPrincipal principal,
Credentials credentials,
boolean firstConnection) |
void |
clearAllListeners() |
Connection |
getConnection() |
Credentials |
getCredentials() |
ClientPrincipal |
getPrincipal() |
Subject |
getSubject() |
TransactionContext |
getTransactionContext(String txnId) |
boolean |
isAlive()
Checks if the endpoint is alive.
|
boolean |
isAuthenticated() |
boolean |
isFirstConnection() |
boolean |
removeDestroyAction(String id) |
void |
removeTransactionContext(String txnId) |
void |
sendEvent(Object key,
Object event,
long callId) |
void |
sendResponse(Object response,
long callId) |
void |
setLoginContext(LoginContext lc) |
void |
setTransactionContext(TransactionContext context) |
getClientType, getSocketAddress, getUuid
boolean isAlive()
void sendResponse(Object response, long callId)
void addListenerDestroyAction(String service, String topic, String id)
service
- name of the related service of listenertopic
- topic name of listener(mostly distributed object name)id
- registration id of remove actionvoid addDestroyAction(String registrationId, Callable<Boolean> removeAction)
registrationId
- registration id of destroy actionremoveAction
- callable that will be called when endpoint is destroyedboolean removeDestroyAction(String id)
id
- registration id of destroy actionCredentials getCredentials()
void setTransactionContext(TransactionContext context)
TransactionContext getTransactionContext(String txnId)
void removeTransactionContext(String txnId)
boolean isFirstConnection()
Subject getSubject()
void clearAllListeners()
Connection getConnection()
void setLoginContext(LoginContext lc)
void authenticated(ClientPrincipal principal, Credentials credentials, boolean firstConnection)
void authenticated(ClientPrincipal principal)
ClientPrincipal getPrincipal()
boolean isAuthenticated()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.