org.apache.avro.ipc
Class SocketTransceiver

java.lang.Object
  extended by org.apache.avro.ipc.Transceiver
      extended by org.apache.avro.ipc.SocketTransceiver
All Implemented Interfaces:
Closeable

Deprecated. use SaslSocketTransceiver instead.

public class SocketTransceiver
extends Transceiver

A socket-based Transceiver implementation. This uses a simple, non-standard wire protocol and is not intended for production services.


Constructor Summary
SocketTransceiver(SocketAddress address)
          Deprecated.  
SocketTransceiver(SocketChannel channel)
          Deprecated.  
 
Method Summary
 void close()
          Deprecated.  
 Protocol getRemote()
          Deprecated. Returns the protocol passed to Transceiver.setRemote(Protocol).
 String getRemoteName()
          Deprecated.  
 boolean isConnected()
          Deprecated. True if a handshake has been completed for this connection.
 List<ByteBuffer> readBuffers()
          Deprecated. Called by the default definition of Transceiver.transceive(List).
 void setRemote(Protocol remote)
          Deprecated. Called with the remote protocol when a handshake has been completed.
 void writeBuffers(List<ByteBuffer> buffers)
          Deprecated. Called by Requestor.request(String,Object) for one-way messages.
 
Methods inherited from class org.apache.avro.ipc.Transceiver
lockChannel, transceive, transceive, unlockChannel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketTransceiver

public SocketTransceiver(SocketAddress address)
                  throws IOException
Deprecated. 
Throws:
IOException

SocketTransceiver

public SocketTransceiver(SocketChannel channel)
                  throws IOException
Deprecated. 
Throws:
IOException
Method Detail

getRemoteName

public String getRemoteName()
Deprecated. 
Specified by:
getRemoteName in class Transceiver

readBuffers

public List<ByteBuffer> readBuffers()
                             throws IOException
Deprecated. 
Description copied from class: Transceiver
Called by the default definition of Transceiver.transceive(List).

Specified by:
readBuffers in class Transceiver
Throws:
IOException

writeBuffers

public void writeBuffers(List<ByteBuffer> buffers)
                  throws IOException
Deprecated. 
Description copied from class: Transceiver
Called by Requestor.request(String,Object) for one-way messages.

Specified by:
writeBuffers in class Transceiver
Throws:
IOException

isConnected

public boolean isConnected()
Deprecated. 
Description copied from class: Transceiver
True if a handshake has been completed for this connection. Used to determine whether a handshake need be completed prior to a one-way message. Requests and responses are always prefixed by handshakes, but one-way messages. If the first request sent over a connection is one-way, then a handshake-only response is returned. Subsequent one-way messages over the connection will have no response data sent. Returns false by default.

Overrides:
isConnected in class Transceiver

setRemote

public void setRemote(Protocol remote)
Deprecated. 
Description copied from class: Transceiver
Called with the remote protocol when a handshake has been completed. After this has been called and while a connection is maintained, Transceiver.isConnected() should return true and #getRemote() should return this protocol. Does nothing by default.

Overrides:
setRemote in class Transceiver

getRemote

public Protocol getRemote()
Deprecated. 
Description copied from class: Transceiver
Returns the protocol passed to Transceiver.setRemote(Protocol). Throws IllegalStateException by default.

Overrides:
getRemote in class Transceiver

close

public void close()
           throws IOException
Deprecated. 
Specified by:
close in interface Closeable
Overrides:
close in class Transceiver
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.