com.hazelcast.client.connection.nio
public class ClientConnectionManagerImpl extends Object implements ClientConnectionManager
Constructor and Description |
---|
ClientConnectionManagerImpl(HazelcastClientInstanceImpl client,
AddressTranslator addressTranslator) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionHeartbeatListener(ConnectionHeartbeatListener connectionHeartbeatListener) |
void |
addConnectionListener(ConnectionListener connectionListener) |
void |
destroyConnection(Connection connection)
Destroys the connection
Clears related resources of given connection.
|
ClientConnection |
getConnection(Address target) |
ClientConnection |
getOrConnect(Address target,
Authenticator authenticator) |
void |
handlePacket(Packet packet)
Handles incoming network package
|
boolean |
isAlive()
Check if client connection manager is alive.
|
void |
shutdown()
Shutdown clientConnectionManager
|
void |
start()
Start clientConnectionManager
|
public ClientConnectionManagerImpl(HazelcastClientInstanceImpl client, AddressTranslator addressTranslator)
public boolean isAlive()
ClientConnectionManager
isAlive
in interface ClientConnectionManager
public void start()
ClientConnectionManager
start
in interface ClientConnectionManager
public void shutdown()
ClientConnectionManager
shutdown
in interface ClientConnectionManager
public ClientConnection getConnection(Address target)
getConnection
in interface ClientConnectionManager
target
- to be connectedpublic ClientConnection getOrConnect(Address target, Authenticator authenticator) throws IOException
getOrConnect
in interface ClientConnectionManager
target
- to be connectedauthenticator
- Authenticator implementation to send appropriate Authentication Request after connectionIOException
- if connection is not establishedpublic void destroyConnection(Connection connection)
ClientConnectionManager
destroyConnection
in interface ClientConnectionManager
connection
- to be closedpublic void handlePacket(Packet packet)
ClientConnectionManager
handlePacket
in interface ClientConnectionManager
packet
- to be processedpublic void addConnectionListener(ConnectionListener connectionListener)
addConnectionListener
in interface ClientConnectionManager
public void addConnectionHeartbeatListener(ConnectionHeartbeatListener connectionHeartbeatListener)
addConnectionHeartbeatListener
in interface ClientConnectionManager
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.