com.hazelcast.client.impl
Class ClientEndpointManagerImpl

java.lang.Object
  extended by com.hazelcast.client.impl.ClientEndpointManagerImpl
All Implemented Interfaces:
ClientEndpointManager

public class ClientEndpointManagerImpl
extends Object
implements ClientEndpointManager

Manages and stores ClientEndpointImpls.


Constructor Summary
ClientEndpointManagerImpl(ClientEngineImpl clientEngine, NodeEngine nodeEngine)
           
 
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 ce, boolean closeImmediately)
          Removes an endpoint and optionally closes it immediately.
 void removeEndpoints(String memberUuid)
           
 int size()
          Returns the current number of endpoints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientEndpointManagerImpl

public ClientEndpointManagerImpl(ClientEngineImpl clientEngine,
                                 NodeEngine nodeEngine)
Method Detail

getEndpoints

public Set<ClientEndpoint> getEndpoints(String clientUuid)
Description copied from interface: ClientEndpointManager
Gets all the endpoints for a given client.

Specified by:
getEndpoints in interface ClientEndpointManager
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.

getEndpoint

public ClientEndpoint getEndpoint(Connection connection)
Description copied from interface: ClientEndpointManager
Gets the endpoint for a given connection.

Specified by:
getEndpoint in interface ClientEndpointManager
Parameters:
connection - the connection to the endpoint.
Returns:
the found endpoint or null of no endpoint was found.

registerEndpoint

public void registerEndpoint(ClientEndpoint endpoint)
Description copied from interface: ClientEndpointManager
Registers an endpoint with this ClientEndpointManager. If the endpoint already is registered, the call is ignored.

Specified by:
registerEndpoint in interface ClientEndpointManager
Parameters:
endpoint - the endpoint to register.

removeEndpoint

public void removeEndpoint(ClientEndpoint endpoint)
Description copied from interface: ClientEndpointManager
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

Specified by:
removeEndpoint in interface ClientEndpointManager
Parameters:
endpoint - the endpoint to remove.
See Also:
ClientEndpointManager.removeEndpoint(ClientEndpoint, boolean)

removeEndpoint

public void removeEndpoint(ClientEndpoint ce,
                           boolean closeImmediately)
Description copied from interface: ClientEndpointManager
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

Specified by:
removeEndpoint in interface ClientEndpointManager
Parameters:
ce - the endpoint to remove.
closeImmediately - if the endpoint is immediately closed.
See Also:
ClientEndpointManager.removeEndpoint(ClientEndpoint)

removeEndpoints

public void removeEndpoints(String memberUuid)

clear

public void clear()
Description copied from interface: ClientEndpointManager
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.

Specified by:
clear in interface ClientEndpointManager

getEndpoints

public Collection<ClientEndpoint> getEndpoints()
Description copied from interface: ClientEndpointManager
Returns the current endpoints.

Specified by:
getEndpoints in interface ClientEndpointManager
Returns:
the endpoints.

size

public int size()
Description copied from interface: ClientEndpointManager
Returns the current number of endpoints.

Specified by:
size in interface ClientEndpointManager
Returns:
the current number of endpoints.


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