@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
IOException
public String getBindPath()
public void setReceiveBufferSize(int size) throws IOException
PeerServer
setReceiveBufferSize
in interface PeerServer
size
- The receive buffer size.IOException
public Peer accept() throws IOException, SocketTimeoutException
PeerServer
accept
in interface PeerServer
IOException
- 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 PeerServer
public void close() throws IOException
PeerServer
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PeerServer
IOException
- If there is an error closing the PeerServerCopyright © 2013 Apache Software Foundation. All rights reserved.