com.hazelcast.client

## Interface ClientEndpoint

- All Superinterfaces:
    Client, Endpoint

      @PrivateApi
      public interface ClientEndpoint
      extends Client

  Represents an endpoint to a client. So for each client connected to a member, a ClientEndpoint object is available.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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(com.hazelcast.client.impl.client.ClientPrincipal principal)`
    `void` | `authenticated(com.hazelcast.client.impl.client.ClientPrincipal principal, Credentials credentials, boolean firstConnection, String clientVersion, long authCorrelationId)`
    `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)`

    - ### Methods inherited from interface com.hazelcast.core.Client

      `getClientType, getSocketAddress, getUuid`

- - ### Method Detail

    - #### isAlive

          boolean isAlive()

      Checks if the endpoint is alive.
      Returns:
        true if alive, false otherwise.

    - #### addListenerDestroyAction

          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.
      Parameters:
        `service` - name of the related service of listener
        `topic` - topic name of listener(mostly distributed object name)
        `id` - registration ID of remove action

    - #### addDestroyAction

          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.
      Parameters:
        `registrationId` - registration ID of destroy action
        `removeAction` - callable that will be called when endpoint is destroyed

    - #### removeDestroyAction

          boolean removeDestroyAction(String id)

      Parameters:
        `id` - registration ID of destroy action
      Returns:
        true if remove is successful

    - #### getCredentials

          Credentials getCredentials()

    - #### setTransactionContext

          void setTransactionContext(TransactionContext context)

    - #### getTransactionContext

          TransactionContext getTransactionContext(String txnId)

    - #### removeTransactionContext

          void removeTransactionContext(String txnId)

    - #### isOwnerConnection

          boolean isOwnerConnection()

      Indicates whether this endpoint is the owner connection for that client.
      Returns:
        `true` when this endpoint is the owner connection for the client

    - #### getSubject

          Subject getSubject()

    - #### clearAllListeners

          void clearAllListeners()

    - #### getConnection

          Connection getConnection()

    - #### setLoginContext

          void setLoginContext(LoginContext lc)

    - #### authenticated

          void authenticated(com.hazelcast.client.impl.client.ClientPrincipal principal,
                             Credentials credentials,
                             boolean firstConnection,
                             String clientVersion,
                             long authCorrelationId)

    - #### authenticated

          void authenticated(com.hazelcast.client.impl.client.ClientPrincipal principal)

    - #### isAuthenticated

          boolean isAuthenticated()

      Returns:
        true if endpoint is authenticated with valid security credentials, returns false otherwise

    - #### getClientVersion

          int getClientVersion()

      Returns:
        the client version as calculated by `BuildInfo`

    - #### setClientVersion

          void setClientVersion(String version)

      Parameters:
        `version` - the version string as obtained from the environment

    - #### setClientStatistics

          void setClientStatistics(String stats)

      Updates to the latest client statistics.
      Parameters:
        `stats` - the latest statistics retrieved from the client

    - #### getClientStatistics

          String getClientStatistics()

      Returns:
        statistics string for the client

Copyright © 2018. All rights reserved.