com.hazelcast.client.connection.nio
Class ClientConnection
java.lang.Object
com.hazelcast.client.connection.nio.ClientConnection
- All Implemented Interfaces:
- Connection, Closeable
public class ClientConnection
- extends Object
- implements Connection, Closeable
ClientConnection
public ClientConnection(ClientConnectionManager connectionManager,
IOSelector in,
IOSelector out,
int connectionId,
SocketChannelWrapper socketChannelWrapper,
ClientExecutionService executionService,
ClientInvocationServiceImpl invocationService,
SerializationService serializationService)
throws IOException
- Throws:
IOException
incrementPacketCount
public void incrementPacketCount()
decrementPacketCount
public void decrementPacketCount()
registerCallId
public void registerCallId(ClientCallFuture future)
deRegisterCallId
public ClientCallFuture deRegisterCallId(int callId)
deRegisterEventHandler
public ClientCallFuture deRegisterEventHandler(int callId)
getEventHandler
public EventHandler getEventHandler(int callId)
getSerializationService
public SerializationService getSerializationService()
write
public boolean write(SocketWritable packet)
- Specified by:
write in interface Connection
init
public void init()
throws IOException
- Throws:
IOException
write
public void write(Data data)
throws IOException
- Throws:
IOException
read
public Data read()
throws IOException
- Throws:
IOException
getEndPoint
public Address getEndPoint()
- Specified by:
getEndPoint in interface Connection
isAlive
public boolean isAlive()
- Specified by:
isAlive in interface Connection
lastReadTime
public long lastReadTime()
- Specified by:
lastReadTime in interface Connection
lastWriteTime
public long lastWriteTime()
- Specified by:
lastWriteTime in interface Connection
close
public void close()
- Specified by:
close in interface Connection- Specified by:
close in interface Closeable
getType
public ConnectionType getType()
- Specified by:
getType in interface Connection
isClient
public boolean isClient()
- Specified by:
isClient in interface Connection
getInetAddress
public InetAddress getInetAddress()
- Specified by:
getInetAddress in interface Connection
getRemoteSocketAddress
public InetSocketAddress getRemoteSocketAddress()
- Specified by:
getRemoteSocketAddress in interface Connection
getPort
public int getPort()
- Specified by:
getPort in interface Connection
getSocketChannelWrapper
public SocketChannelWrapper getSocketChannelWrapper()
getConnectionManager
public ClientConnectionManager getConnectionManager()
getReadHandler
public ClientReadHandler getReadHandler()
setRemoteEndpoint
public void setRemoteEndpoint(Address remoteEndpoint)
getRemoteEndpoint
public Address getRemoteEndpoint()
getLocalSocketAddress
public InetSocketAddress getLocalSocketAddress()
close
public void close(Throwable t)
isHeartBeating
public boolean isHeartBeating()
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.