|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.client.connection.nio.ClientConnection
public class ClientConnection
| Constructor Summary | |
|---|---|
ClientConnection(HazelcastClientInstanceImpl client,
IOSelector in,
IOSelector out,
int connectionId,
SocketChannelWrapper socketChannelWrapper)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes this connection. |
void |
close(Throwable t)
|
void |
decrementPacketCount()
|
boolean |
equals(Object o)
|
ClientConnectionManager |
getConnectionManager()
|
Address |
getEndPoint()
Gets the Address of the other side of this Connection. |
InetAddress |
getInetAddress()
Returns remote address of this Connection. |
InetSocketAddress |
getLocalSocketAddress()
|
int |
getPacketCount()
|
int |
getPort()
The remote port. |
ClientReadHandler |
getReadHandler()
|
Address |
getRemoteEndpoint()
|
InetSocketAddress |
getRemoteSocketAddress()
Returns the address of the endpoint this Connection is connected to, or null if it is unconnected. |
SerializationService |
getSerializationService()
|
SocketChannelWrapper |
getSocketChannelWrapper()
|
ConnectionType |
getType()
Returns the ConnectionType of this Connection. |
int |
hashCode()
|
void |
incrementPacketCount()
|
void |
init()
|
boolean |
isAlive()
Checks if the Connection is still alive. |
boolean |
isClient()
Checks if it is a client connection. |
boolean |
isHeartBeating()
|
long |
lastReadTime()
Returns the clock time of the most recent read using this connection. |
long |
lastWriteTime()
Returns the clock time of the most recent write using this connection. |
void |
setRemoteEndpoint(Address remoteEndpoint)
|
String |
toString()
|
boolean |
write(SocketWritable packet)
Writes a SocketWritable packet to the other side. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClientConnection(HazelcastClientInstanceImpl client,
IOSelector in,
IOSelector out,
int connectionId,
SocketChannelWrapper socketChannelWrapper)
throws IOException
IOException| Method Detail |
|---|
public void incrementPacketCount()
public void decrementPacketCount()
public int getPacketCount()
public SerializationService getSerializationService()
public boolean write(SocketWritable packet)
Connection
write in interface Connectionpacket - the packet to write.
public void init()
throws IOException
IOExceptionpublic Address getEndPoint()
ConnectionAddress of the other side of this Connection.
todo: rename to get remoteAddress?
getEndPoint in interface Connectionpublic boolean isAlive()
Connection
isAlive in interface Connectionpublic long lastReadTime()
Connection
lastReadTime in interface Connectionpublic long lastWriteTime()
Connection
lastWriteTime in interface Connectionpublic void close()
Connection
close in interface Connectionclose in interface Closeablepublic ConnectionType getType()
ConnectionConnectionType of this Connection.
getType in interface Connectionnull is returned.public boolean isClient()
Connection
isClient in interface Connectionpublic InetAddress getInetAddress()
Connection
getInetAddress in interface Connectionnull if the connection is not alive.public InetSocketAddress getRemoteSocketAddress()
Connectionnull if it is unconnected.
getRemoteSocketAddress in interface Connectionpublic int getPort()
Connection
getPort in interface Connectionpublic SocketChannelWrapper getSocketChannelWrapper()
public ClientConnectionManager getConnectionManager()
public ClientReadHandler getReadHandler()
public void setRemoteEndpoint(Address remoteEndpoint)
public Address getRemoteEndpoint()
public InetSocketAddress getLocalSocketAddress()
public void close(Throwable t)
public boolean isHeartBeating()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||