Interface Server
- All Superinterfaces:
AutoCloseable
,Closeable
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptAll
(ServerSocket ss, long... tokens) Call to enable remote access via all sockets accepted by the givenServerSocket
.void
close()
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-