|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.ipc.Transceiver
public abstract class Transceiver
Base transport class used by Requestor
.
Constructor Summary | |
---|---|
Transceiver()
|
Method Summary | |
---|---|
void |
close()
|
Protocol |
getRemote()
Returns the protocol passed to setRemote(Protocol) . |
abstract String |
getRemoteName()
|
boolean |
isConnected()
True if a handshake has been completed for this connection. |
abstract List<ByteBuffer> |
readBuffers()
Called by the default definition of transceive(List) . |
void |
setRemote(Protocol protocol)
Called with the remote protocol when a handshake has been completed. |
List<ByteBuffer> |
transceive(List<ByteBuffer> request)
Called by Requestor.request(String,Object) for two-way messages. |
abstract void |
writeBuffers(List<ByteBuffer> buffers)
Called by Requestor.request(String,Object) for one-way messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transceiver()
Method Detail |
---|
public abstract String getRemoteName()
public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException
Requestor.request(String,Object)
for two-way messages.
By default calls writeBuffers(List)
followed by
readBuffers()
.
IOException
public abstract List<ByteBuffer> readBuffers() throws IOException
transceive(List)
.
IOException
public abstract void writeBuffers(List<ByteBuffer> buffers) throws IOException
Requestor.request(String,Object)
for one-way messages.
IOException
public boolean isConnected()
public void setRemote(Protocol protocol)
isConnected()
should return true and #getRemote() should return this
protocol. Does nothing by default.
public Protocol getRemote()
setRemote(Protocol)
. Throws
IllegalStateException by default.
public void close() throws IOException
close
in interface Closeable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |