Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.client.hotrod.impl.transport.tcp
Class TcpTransport

java.lang.Object
  extended by org.infinispan.client.hotrod.impl.transport.AbstractTransport
      extended by org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport
All Implemented Interfaces:
Transport

@ThreadSafe
public class TcpTransport
extends AbstractTransport

Transport implementation based on TCP.

Since:
4.1
Author:
Mircea.Markus@jboss.com

Constructor Summary
TcpTransport(SocketAddress serverAddress, TransportFactory transportFactory)
           
 
Method Summary
 void destroy()
           
 byte[] dumpStream()
           
 boolean equals(Object o)
           
 void flush()
           
 long getId()
           
 SocketAddress getRemoteSocketAddress()
          Returns the address of the endpoint this transport is connected to, or null if it is unconnected.
 SocketAddress getServerAddress()
           
 int hashCode()
           
 void invalidate()
          Invalidates transport instance.
 boolean isValid()
           
 short readByte()
           
 byte[] readByteArray(int size)
           
 int readVInt()
           
 long readVLong()
           
 void release()
           
 String toString()
           
 void writeByte(short toWrite)
           
protected  void writeBytes(byte[] toAppend)
           
 void writeVInt(int vInt)
           
 void writeVLong(long l)
           
 
Methods inherited from class org.infinispan.client.hotrod.impl.transport.AbstractTransport
getTransportFactory, read4ByteInt, readArray, readLong, readString, readUnsignedShort, writeArray, writeLong, writeString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpTransport

public TcpTransport(SocketAddress serverAddress,
                    TransportFactory transportFactory)
Method Detail

writeVInt

public void writeVInt(int vInt)

writeVLong

public void writeVLong(long l)

readVLong

public long readVLong()

readVInt

public int readVInt()

writeBytes

protected void writeBytes(byte[] toAppend)
Specified by:
writeBytes in class AbstractTransport

writeByte

public void writeByte(short toWrite)

flush

public void flush()

readByte

public short readByte()

release

public void release()

readByteArray

public byte[] readByteArray(int size)

getServerAddress

public SocketAddress getServerAddress()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

destroy

public void destroy()

isValid

public boolean isValid()

getId

public long getId()

dumpStream

public byte[] dumpStream()

getRemoteSocketAddress

public SocketAddress getRemoteSocketAddress()
Description copied from interface: Transport
Returns the address of the endpoint this transport is connected to, or null if it is unconnected.

Returns:
a SocketAddress reprensenting the remote endpoint of this transport, or null if it is not connected yet.

invalidate

public void invalidate()
Description copied from interface: Transport
Invalidates transport instance.


Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.