@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 Peer
public void setReadTimeout(int timeoutMs) throws IOException
Peer
setReadTimeout
in interface Peer
timeoutMs
- The timeout in milliseconds.IOException
public int getReceiveBufferSize() throws IOException
getReceiveBufferSize
in interface Peer
IOException
public boolean getTcpNoDelay() throws IOException
getTcpNoDelay
in interface Peer
IOException
public void setWriteTimeout(int timeoutMs) throws IOException
Peer
BasicSocketPeer#setWriteTimeout
for details.setWriteTimeout
in interface Peer
timeoutMs
- The timeout in milliseconds.IOException
public boolean isClosed()
public void close() throws IOException
Peer
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Peer
IOException
public String getRemoteAddressString()
getRemoteAddressString
in interface Peer
public String getLocalAddressString()
getLocalAddressString
in interface Peer
public InputStream getInputStream() throws IOException
getInputStream
in interface Peer
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface Peer
IOException
public boolean isLocal()
public DomainSocket getDomainSocket()
getDomainSocket
in interface Peer
Copyright © 2013 Apache Software Foundation. All rights reserved.