com.hazelcast.client
Interface ClientEndpointManager

All Known Implementing Classes:
ClientEndpointManagerImpl

public interface ClientEndpointManager

A manager for ClientEndpoints. All the methods are thread-safe.


Method Summary
 void clear()
          Removes all endpoints.
 ClientEndpoint getEndpoint(Connection connection)
          Gets the endpoint for a given connection.
 Collection<ClientEndpoint> getEndpoints()
          Returns the current endpoints.
 Set<ClientEndpoint> getEndpoints(String clientUuid)
          Gets all the endpoints for a given client.
 void registerEndpoint(ClientEndpoint endpoint)
          Registers an endpoint with this ClientEndpointManager.
 void removeEndpoint(ClientEndpoint endpoint)
          Removes an endpoint from this ClientEndpointManager.
 void removeEndpoint(ClientEndpoint endpoint, boolean closeImmediately)
          Removes an endpoint and optionally closes it immediately.
 int size()
          Returns the current number of endpoints.
 

Method Detail

getEndpoints

Collection<ClientEndpoint> getEndpoints()
Returns the current endpoints.

Returns:
the endpoints.

getEndpoint

ClientEndpoint getEndpoint(Connection connection)
Gets the endpoint for a given connection.

Parameters:
connection - the connection to the endpoint.
Returns:
the found endpoint or null of no endpoint was found.
Throws:
NullPointerException - if connection is null.

getEndpoints

Set<ClientEndpoint> getEndpoints(String clientUuid)
Gets all the endpoints for a given client.

Parameters:
clientUuid - the uuid of the client
Returns:
a set of all the endpoints for the client. If no endpoints are found, an empty set is returned.
Throws:
NullPointerException - if clientUuid is null.

size

int size()
Returns the current number of endpoints.

Returns:
the current number of endpoints.

clear

void clear()
Removes all endpoints. Nothing is done on the endpoints themselves; they are just removed from this ClientEndpointManager. Can safely be called when there are no endpoints.


registerEndpoint

void registerEndpoint(ClientEndpoint endpoint)
Registers an endpoint with this ClientEndpointManager. If the endpoint already is registered, the call is ignored.

Parameters:
endpoint - the endpoint to register.
Throws:
NullPointerException - if endpoint is null.

removeEndpoint

void removeEndpoint(ClientEndpoint endpoint)
Removes an endpoint from this ClientEndpointManager. This method doesn't close the endpoint. todo: what happens when the endpoint already is removed todo: what happens when the endpoint was never registered

Parameters:
endpoint - the endpoint to remove.
Throws:
NullPointerException - if endpoint is null.
See Also:
removeEndpoint(ClientEndpoint, boolean)

removeEndpoint

void removeEndpoint(ClientEndpoint endpoint,
                    boolean closeImmediately)
Removes an endpoint and optionally closes it immediately. todo: what happens when the endpoint already is removed todo: what happens when the endpoint was never registered

Parameters:
endpoint - the endpoint to remove.
closeImmediately - if the endpoint is immediately closed.
Throws:
NullPointerException - if endpoint is null.
See Also:
removeEndpoint(ClientEndpoint)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.