|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClientConnectionManager
Responsible for managing ClientConnection
objects.
Method Summary | |
---|---|
ClientConnection |
connectToAddress(Address target)
|
String |
getUuid()
|
void |
handlePacket(Packet packet)
Handles incoming network package |
boolean |
isAlive()
Check if client connection manager is alive. |
int |
newCallId()
Next unique call id for request |
void |
onCloseOwnerConnection()
Called when an owner connection is closed |
void |
onConnectionClose(ClientConnection clientConnection)
Called when an connection is closed. |
void |
onDetectingUnresponsiveConnection(ClientConnection connection)
Called heartbeat timeout is detected on a connection. |
ClientConnection |
ownerConnection(Address address)
Creates a new owner connection to given address |
void |
removeEndpoint(Address address)
Called when a member left the cluster |
boolean |
removeEventHandler(Integer callId)
Removes event handler corresponding to callId from responsible ClientConnection |
Object |
sendAndReceive(ClientRequest request,
ClientConnection connection)
Sends request and waits for response |
void |
shutdown()
Shutdown clientConnectionManager |
void |
start()
Start clientConnectionManager |
ClientConnection |
tryToConnect(Address address)
Tries to connect to an address in member list. |
Method Detail |
---|
void shutdown()
boolean isAlive()
void start()
ClientConnection connectToAddress(Address target) throws Exception
Exception
ClientConnection tryToConnect(Address address) throws Exception
address
- hintAddress
Exception
- authentication failed or no connection foundClientConnection ownerConnection(Address address) throws IOException
address
- to be connection to established
IOException
void onCloseOwnerConnection()
String getUuid()
void onConnectionClose(ClientConnection clientConnection)
clientConnection
- closed connectionvoid removeEndpoint(Address address)
address
- address of the memberboolean removeEventHandler(Integer callId)
callId
- of event handler registration request
void handlePacket(Packet packet)
packet
- to be processedint newCallId()
Object sendAndReceive(ClientRequest request, ClientConnection connection) throws Exception
request
- to be sendconnection
- to send the request over
Exception
- if a network connection occurs or response is an exceptionvoid onDetectingUnresponsiveConnection(ClientConnection connection)
connection
- to be marked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |