@InterfaceAudience.Private public interface Peer extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the peer.
|
DomainSocket |
getDomainSocket() |
InputStream |
getInputStream() |
ReadableByteChannel |
getInputStreamChannel() |
String |
getLocalAddressString() |
OutputStream |
getOutputStream() |
int |
getReceiveBufferSize() |
String |
getRemoteAddressString() |
boolean |
getTcpNoDelay() |
boolean |
isClosed() |
boolean |
isLocal() |
void |
setReadTimeout(int timeoutMs)
Set the read timeout on this peer.
|
void |
setWriteTimeout(int timeoutMs)
Set the write timeout on this peer.
|
ReadableByteChannel getInputStreamChannel()
void setReadTimeout(int timeoutMs) throws IOException
timeoutMs
- The timeout in milliseconds.IOException
int getReceiveBufferSize() throws IOException
IOException
boolean getTcpNoDelay() throws IOException
IOException
void setWriteTimeout(int timeoutMs) throws IOException
BasicSocketPeer#setWriteTimeout
for details.timeoutMs
- The timeout in milliseconds.IOException
boolean isClosed()
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
String getRemoteAddressString()
String getLocalAddressString()
InputStream getInputStream() throws IOException
IOException
OutputStream getOutputStream() throws IOException
IOException
boolean isLocal()
DomainSocket getDomainSocket()
Copyright © 2013 Apache Software Foundation. All rights reserved.