public final class ClientEndpointImpl extends Object implements ClientEndpoint
ClientEndpoint and Client implementation.| Constructor and Description |
|---|
ClientEndpointImpl(ClientEngine clientEngine,
NodeEngineImpl nodeEngine,
Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDestroyAction(UUID 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,
UUID 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(UUID clientUuid,
Credentials credentials,
String clientVersion,
long authCorrelationId,
String clientName,
Set<String> labels) |
void |
clearAllListeners() |
void |
destroy() |
String |
getClientStatistics() |
ClientType |
getClientType()
Returns the type of this client.
|
Connection |
getConnection() |
Credentials |
getCredentials() |
Set<String> |
getLabels() |
String |
getName()
This method may return null depending on the client version and the client type
Java client provides client name starting with 3.12
|
InetSocketAddress |
getSocketAddress()
Returns the socket address of this client.
|
Subject |
getSubject() |
TransactionContext |
getTransactionContext(UUID txnId) |
UUID |
getUuid()
Returns a unique UUID for this client.
|
boolean |
isAlive()
Checks if the endpoint is alive.
|
boolean |
isAuthenticated() |
boolean |
removeDestroyAction(UUID id) |
void |
removeTransactionContext(UUID txnId) |
void |
setClientStatistics(String stats)
Updates to the latest client statistics.
|
void |
setClientVersion(String version) |
void |
setLoginContext(LoginContext loginContext) |
void |
setTransactionContext(TransactionContext transactionContext) |
String |
toString() |
public ClientEndpointImpl(ClientEngine clientEngine, NodeEngineImpl nodeEngine, Connection connection)
public Connection getConnection()
getConnection in interface ClientEndpointpublic UUID getUuid()
Clientpublic boolean isAlive()
ClientEndpointisAlive in interface ClientEndpointpublic void setLoginContext(LoginContext loginContext)
setLoginContext in interface ClientEndpointpublic Subject getSubject()
getSubject in interface ClientEndpointpublic void authenticated(UUID clientUuid, Credentials credentials, String clientVersion, long authCorrelationId, String clientName, Set<String> labels)
authenticated in interface ClientEndpointpublic boolean isAuthenticated()
isAuthenticated in interface ClientEndpointpublic void setClientVersion(String version)
setClientVersion in interface ClientEndpointversion - the version string as obtained from the environmentpublic void setClientStatistics(String stats)
ClientEndpointsetClientStatistics in interface ClientEndpointstats - the latest statistics retrieved from the clientpublic String getClientStatistics()
getClientStatistics in interface ClientEndpointpublic InetSocketAddress getSocketAddress()
ClientgetSocketAddress in interface ClientgetSocketAddress in interface Endpointpublic ClientType getClientType()
ClientgetClientType in interface Clientpublic String getName()
Clientpublic TransactionContext getTransactionContext(UUID txnId)
getTransactionContext in interface ClientEndpointpublic Credentials getCredentials()
getCredentials in interface ClientEndpointpublic void setTransactionContext(TransactionContext transactionContext)
setTransactionContext in interface ClientEndpointpublic void removeTransactionContext(UUID txnId)
removeTransactionContext in interface ClientEndpointpublic void addListenerDestroyAction(String service, String topic, UUID id)
ClientEndpointaddListenerDestroyAction in interface ClientEndpointservice - name of the related service of listenertopic - topic name of listener(mostly distributed object name)id - registration ID of remove actionpublic void addDestroyAction(UUID registrationId, Callable<Boolean> removeAction)
ClientEndpointaddDestroyAction in interface ClientEndpointregistrationId - registration ID of destroy actionremoveAction - callable that will be called when endpoint is destroyedpublic boolean removeDestroyAction(UUID id)
removeDestroyAction in interface ClientEndpointid - registration ID of destroy actionpublic void clearAllListeners()
clearAllListeners in interface ClientEndpointpublic void destroy()
throws LoginException
LoginExceptionCopyright © 2019 Hazelcast, Inc.. All rights reserved.