@InterfaceAudience.Private public class DomainPeerServer extends Object implements PeerServer
| Constructor and Description |
|---|
DomainPeerServer(String path,
int port) |
| 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 |
getBindPath() |
String |
getListeningString() |
void |
setReceiveBufferSize(int size)
Set the receive buffer size of the PeerServer.
|
String |
toString() |
public DomainPeerServer(String path, int port) throws IOException
IOExceptionpublic String getBindPath()
public void setReceiveBufferSize(int size)
throws IOException
PeerServersetReceiveBufferSize in interface PeerServersize - The receive buffer size.IOExceptionpublic Peer accept() throws IOException, SocketTimeoutException
PeerServeraccept in interface PeerServerIOException - if an I/O error occurs when waiting for a
connection.SocketTimeoutException - if a timeout was previously set and
the timeout has been reached.public String getListeningString()
getListeningString in interface PeerServerpublic void close()
throws IOException
PeerServerclose in interface Closeableclose in interface AutoCloseableclose in interface PeerServerIOException - If there is an error closing the PeerServerCopyright © 2013 Apache Software Foundation. All rights reserved.