Class ZeroServer
java.lang.Object
org.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
org.newsclub.net.unix.demo.server.ZeroServer
public final class ZeroServer
extends org.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
A multi-threaded unix socket server that simply writes null-bytes, and does not attempt to read
anything.
- Author:
- Christian Kohlschütter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoServeSocket(Socket socket) protected ServerSocketprotected voidonAfterServingSocket(Socket socket) protected voidonBeforeServingSocket(Socket socket) protected voidprotected voidonServerBound(SocketAddress address) protected voidonServerBusy(long busySince) protected voidonServerReady(int activeCount) protected voidprotected voidprotected voidonServerStopped(ServerSocket theServerSocket) protected voidonServingException(Socket socket, Throwable t) protected voidonSocketExceptionAfterAccept(Socket socket, SocketException e) protected voidprotected voidonSubmitted(Socket socket, Future<?> submit) Methods inherited from class org.newsclub.net.unix.server.SocketServer
doSocketClose, getListenAddress, getMaxConcurrentConnections, getServerBusyTimeout, getServerTimeout, getSocketTimeout, isReady, isRunning, onListenException, onServingException, setMaxConcurrentConnections, setServerBusyTimeout, setServerTimeout, setSocketTimeout, start, startAndWaitToBecomeReady, startAndWaitToBecomeReady, startThenStopAfter, stop
-
Constructor Details
-
ZeroServer
-
-
Method Details
-
doServeSocket
- Specified by:
doServeSocketin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>- Throws:
IOException
-
onServerStarting
protected void onServerStarting()- Overrides:
onServerStartingin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServerBound
- Overrides:
onServerBoundin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServerBusy
protected void onServerBusy(long busySince) - Overrides:
onServerBusyin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServerReady
protected void onServerReady(int activeCount) - Overrides:
onServerReadyin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServerStopped
- Overrides:
onServerStoppedin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onSubmitted
- Overrides:
onSubmittedin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onBeforeServingSocket
- Overrides:
onBeforeServingSocketin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServerShuttingDown
protected void onServerShuttingDown()- Overrides:
onServerShuttingDownin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onSocketExceptionDuringAccept
- Overrides:
onSocketExceptionDuringAcceptin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onSocketExceptionAfterAccept
- Overrides:
onSocketExceptionAfterAcceptin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onServingException
- Overrides:
onServingExceptionin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onAfterServingSocket
- Overrides:
onAfterServingSocketin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
onListenException
- Overrides:
onListenExceptionin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
-
newServerSocket
- Specified by:
newServerSocketin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>- Throws:
IOException
-