|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.ipc.Transceiver org.apache.avro.ipc.SaslSocketTransceiver
public class SaslSocketTransceiver
A Transceiver
that uses javax.security.sasl
for
authentication and encryption.
Constructor Summary | |
---|---|
SaslSocketTransceiver(SocketAddress address)
Create using SASL's anonymous (RFC 2245) mechanism. |
|
SaslSocketTransceiver(SocketAddress address,
SaslClient saslClient)
Create using the specified SaslClient . |
|
SaslSocketTransceiver(SocketChannel channel,
SaslServer saslServer)
Create using the specified SaslServer . |
Method Summary | |
---|---|
void |
close()
|
Protocol |
getRemote()
Returns the protocol passed to Transceiver.setRemote(Protocol) . |
String |
getRemoteName()
|
boolean |
isConnected()
True if a handshake has been completed for this connection. |
List<ByteBuffer> |
readBuffers()
Called by the default definition of Transceiver.transceive(List) . |
void |
setRemote(Protocol remote)
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. |
void |
writeBuffers(List<ByteBuffer> buffers)
Called by Requestor.request(String,Object) for one-way messages. |
Methods inherited from class org.apache.avro.ipc.Transceiver |
---|
lockChannel, transceive, unlockChannel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SaslSocketTransceiver(SocketAddress address) throws IOException
IOException
public SaslSocketTransceiver(SocketAddress address, SaslClient saslClient) throws IOException
SaslClient
.
IOException
public SaslSocketTransceiver(SocketChannel channel, SaslServer saslServer) throws IOException
SaslServer
.
IOException
Method Detail |
---|
public boolean isConnected()
Transceiver
isConnected
in class Transceiver
public void setRemote(Protocol remote)
Transceiver
Transceiver.isConnected()
should return true and #getRemote() should return this
protocol. Does nothing by default.
setRemote
in class Transceiver
public Protocol getRemote()
Transceiver
Transceiver.setRemote(Protocol)
. Throws
IllegalStateException by default.
getRemote
in class Transceiver
public String getRemoteName()
getRemoteName
in class Transceiver
public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException
Transceiver
Requestor.request(String,Object)
for two-way messages.
By default calls Transceiver.writeBuffers(List)
followed by
Transceiver.readBuffers()
.
transceive
in class Transceiver
IOException
public List<ByteBuffer> readBuffers() throws IOException
Transceiver
Transceiver.transceive(List)
.
readBuffers
in class Transceiver
IOException
public void writeBuffers(List<ByteBuffer> buffers) throws IOException
Transceiver
Requestor.request(String,Object)
for one-way messages.
writeBuffers
in class Transceiver
IOException
public void close() throws IOException
close
in interface Closeable
close
in class Transceiver
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |