@InterfaceAudience.Private public class DomainPeer extends Object implements Peer
| Constructor and Description |
|---|
DomainPeer(DomainSocket socket) |
| 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.
|
String |
toString() |
public DomainPeer(DomainSocket socket)
public ReadableByteChannel getInputStreamChannel()
getInputStreamChannel in interface Peerpublic void setReadTimeout(int timeoutMs)
throws IOException
PeersetReadTimeout in interface PeertimeoutMs - The timeout in milliseconds.IOExceptionpublic int getReceiveBufferSize()
throws IOException
getReceiveBufferSize in interface PeerIOExceptionpublic boolean getTcpNoDelay()
throws IOException
getTcpNoDelay in interface PeerIOExceptionpublic void setWriteTimeout(int timeoutMs)
throws IOException
PeerBasicSocketPeer#setWriteTimeout for details.setWriteTimeout in interface PeertimeoutMs - The timeout in milliseconds.IOExceptionpublic boolean isClosed()
public void close()
throws IOException
Peerclose in interface Closeableclose in interface AutoCloseableclose in interface PeerIOExceptionpublic String getRemoteAddressString()
getRemoteAddressString in interface Peerpublic String getLocalAddressString()
getLocalAddressString in interface Peerpublic InputStream getInputStream() throws IOException
getInputStream in interface PeerIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface PeerIOExceptionpublic boolean isLocal()
public DomainSocket getDomainSocket()
getDomainSocket in interface PeerCopyright © 2013 Apache Software Foundation. All rights reserved.