org.infinispan.client.hotrod.impl.transport
Class AbstractTransport

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

public abstract class AbstractTransport
extends Object
implements Transport

Support class for transport implementations.

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

Constructor Summary
protected AbstractTransport(TransportFactory transportFactory)
           
 
Method Summary
 TransportFactory getTransportFactory()
           
 int read4ByteInt()
           
 byte[] readArray()
          reads an vint which is size; then an array having that size.
 long readLong()
           
 String readString()
           
 int readUnsignedShort()
           
 void writeArray(byte[] toAppend)
           
protected abstract  void writeBytes(byte[] toAppend)
           
 void writeLong(long longValue)
           
 void writeString(String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.infinispan.client.hotrod.impl.transport.Transport
dumpStream, flush, readByte, readByteArray, readVInt, readVLong, release, writeByte, writeVInt, writeVLong
 

Constructor Detail

AbstractTransport

protected AbstractTransport(TransportFactory transportFactory)
Method Detail

readArray

public byte[] readArray()
Description copied from interface: Transport
reads an vint which is size; then an array having that size.

Specified by:
readArray in interface Transport

readString

public String readString()
Specified by:
readString in interface Transport

readLong

public long readLong()
Specified by:
readLong in interface Transport

writeLong

public void writeLong(long longValue)
Specified by:
writeLong in interface Transport

readUnsignedShort

public int readUnsignedShort()
Specified by:
readUnsignedShort in interface Transport

read4ByteInt

public int read4ByteInt()
Specified by:
read4ByteInt in interface Transport

writeString

public void writeString(String string)
Specified by:
writeString in interface Transport

getTransportFactory

public TransportFactory getTransportFactory()
Specified by:
getTransportFactory in interface Transport

writeArray

public void writeArray(byte[] toAppend)
Specified by:
writeArray in interface Transport

writeBytes

protected abstract void writeBytes(byte[] toAppend)

-->

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