Interface Server
- All Superinterfaces:
AutoCloseable, Closeable
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptAll(ServerSocket ss, long... tokens) Call to enable remote access via all sockets accepted by the givenServerSocket.voidclose()Disables remote access, closes all acceptors, and closes all existing connections.
-
Method Details
-
acceptAll
Call to enable remote access via all sockets accepted by the givenServerSocket. At least one token must match in order for a connection to be accepted.- Throws:
IllegalArgumentException- if not given one or two tokensIOException
-
close
void close()Disables remote access, closes all acceptors, and closes all existing connections.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-