@InterfaceAudience.Private public interface PeerServer extends Closeable
| Modifier and Type | Method and Description |
|---|---|
Peer |
accept()
Listens for a connection to be made to this server and accepts
it.
|
void |
close()
Free the resources associated with this peer server.
|
String |
getListeningString() |
void |
setReceiveBufferSize(int size)
Set the receive buffer size of the PeerServer.
|
void setReceiveBufferSize(int size)
throws IOException
size - The receive buffer size.IOExceptionPeer accept() throws IOException, SocketTimeoutException
IOException - if an I/O error occurs when waiting for a
connection.SecurityException - if a security manager exists and its
checkAccept method doesn't allow the operation.SocketTimeoutException - if a timeout was previously set and
the timeout has been reached.String getListeningString()
void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOException - If there is an error closing the PeerServerCopyright © 2013 Apache Software Foundation. All rights reserved.