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,
String clientVersion,
long authCorrelationId,
String clientName,
Set<String> labels) |
void |
clearAllListeners() |
String |
getClientStatistics() |
int |
getClientVersion() |
Connection |
getConnection() |
Credentials |
getCredentials() |
Subject |
getSubject() |
TransactionContext |
getTransactionContext(String txnId) |
boolean |
isAlive()
Checks if the endpoint is alive.
|
boolean |
isAuthenticated() |
boolean |
isOwnerConnection()
Indicates whether this endpoint is the owner connection for that client.
|
boolean |
removeDestroyAction(String id) |
void |
removeTransactionContext(String txnId) |
void |
setClientStatistics(String stats)
Updates to the latest client statistics.
|
void |
setClientVersion(String version) |
void |
setLoginContext(LoginContext lc) |
void |
setTransactionContext(TransactionContext context) |
getClientType, getLabels, getName, getSocketAddress, getUuid
boolean isAlive()
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 isOwnerConnection()
true
when this endpoint is the owner connection for the clientSubject getSubject()
void clearAllListeners()
Connection getConnection()
void setLoginContext(LoginContext lc)
void authenticated(ClientPrincipal principal, Credentials credentials, boolean firstConnection, String clientVersion, long authCorrelationId, String clientName, Set<String> labels)
void authenticated(ClientPrincipal principal)
boolean isAuthenticated()
int getClientVersion()
BuildInfo
void setClientVersion(String version)
version
- the version string as obtained from the environmentvoid setClientStatistics(String stats)
stats
- the latest statistics retrieved from the clientString getClientStatistics()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.