com.hazelcast.client.connection.nio
Class ClientConnection

java.lang.Object
  extended by com.hazelcast.client.connection.nio.ClientConnection
All Implemented Interfaces:
Connection, Closeable

public class ClientConnection
extends Object
implements Connection, Closeable


Constructor Summary
ClientConnection(ClientConnectionManager connectionManager, IOSelector in, IOSelector out, int connectionId, SocketChannelWrapper socketChannelWrapper, ClientExecutionService executionService, ClientInvocationServiceImpl invocationService, SerializationService serializationService)
           
 
Method Summary
 void close()
           
 void close(Throwable t)
           
 void decrementPacketCount()
           
 ClientCallFuture deRegisterCallId(int callId)
           
 ClientCallFuture deRegisterEventHandler(int callId)
           
 boolean equals(Object o)
           
 ClientConnectionManager getConnectionManager()
           
 Address getEndPoint()
           
 EventHandler getEventHandler(int callId)
           
 InetAddress getInetAddress()
           
 InetSocketAddress getLocalSocketAddress()
           
 int getPort()
           
 ClientReadHandler getReadHandler()
           
 Address getRemoteEndpoint()
           
 InetSocketAddress getRemoteSocketAddress()
           
 SerializationService getSerializationService()
           
 SocketChannelWrapper getSocketChannelWrapper()
           
 ConnectionType getType()
           
 int hashCode()
           
 void incrementPacketCount()
           
 void init()
           
 boolean isAlive()
           
 boolean isClient()
           
 boolean isHeartBeating()
           
 long lastReadTime()
           
 long lastWriteTime()
           
 Data read()
           
 void registerCallId(ClientCallFuture future)
           
 void setRemoteEndpoint(Address remoteEndpoint)
           
 String toString()
           
 void write(Data data)
           
 boolean write(SocketWritable packet)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientConnection

public ClientConnection(ClientConnectionManager connectionManager,
                        IOSelector in,
                        IOSelector out,
                        int connectionId,
                        SocketChannelWrapper socketChannelWrapper,
                        ClientExecutionService executionService,
                        ClientInvocationServiceImpl invocationService,
                        SerializationService serializationService)
                 throws IOException
Throws:
IOException
Method Detail

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.