| Constructor | Description |
|---|---|
NioInetPeer(java.net.Socket socket) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the peer.
|
org.apache.hadoop.net.unix.DomainSocket |
getDomainSocket() |
|
java.io.InputStream |
getInputStream() |
|
java.nio.channels.ReadableByteChannel |
getInputStreamChannel() |
|
java.lang.String |
getLocalAddressString() |
|
java.io.OutputStream |
getOutputStream() |
|
int |
getReceiveBufferSize() |
|
java.lang.String |
getRemoteAddressString() |
|
boolean |
getTcpNoDelay() |
|
boolean |
hasSecureChannel() |
Return true if the channel is secure.
|
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.
|
java.lang.String |
toString() |
public NioInetPeer(java.net.Socket socket)
throws java.io.IOException
java.io.IOExceptionpublic java.nio.channels.ReadableByteChannel getInputStreamChannel()
getInputStreamChannel in interface Peerpublic void setReadTimeout(int timeoutMs)
throws java.io.IOException
PeersetReadTimeout in interface PeertimeoutMs - The timeout in milliseconds.java.io.IOExceptionpublic int getReceiveBufferSize()
throws java.io.IOException
getReceiveBufferSize in interface Peerjava.io.IOExceptionpublic boolean getTcpNoDelay()
throws java.io.IOException
getTcpNoDelay in interface Peerjava.io.IOExceptionpublic void setWriteTimeout(int timeoutMs)
throws java.io.IOException
PeerBasicInetPeer.setWriteTimeout(int) for details.setWriteTimeout in interface PeertimeoutMs - The timeout in milliseconds.java.io.IOExceptionpublic boolean isClosed()
public void close()
throws java.io.IOException
Peerpublic java.lang.String getRemoteAddressString()
getRemoteAddressString in interface Peerpublic java.lang.String getLocalAddressString()
getLocalAddressString in interface Peerpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface Peerjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface Peerjava.io.IOExceptionpublic boolean isLocal()
public java.lang.String toString()
toString in class java.lang.Objectpublic org.apache.hadoop.net.unix.DomainSocket getDomainSocket()
getDomainSocket in interface Peerpublic boolean hasSecureChannel()
PeerhasSecureChannel in interface PeerCopyright © 2008–2025 Apache Software Foundation. All rights reserved.