Class ChargenServer
java.lang.Object
org.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
org.newsclub.net.unix.demo.server.ChargenServer
public final class ChargenServer
extends org.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>
A multi-threaded unix socket server that implements a TCP-style character generator compliant
with RFC864.
- Author:
- Christian Kohlschütter
-
Constructor Summary
ConstructorsConstructorDescriptionChargenServer(SocketAddress listenAddress) ChargenServer(SocketAddress listenAddress, boolean fast) -
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
-
ChargenServer
-
ChargenServer
-
-
Method Details
-
onServerStarting
protected void onServerStarting() -
doServeSocket
- Specified by:
doServeSocketin classorg.newsclub.net.unix.server.SocketServer<SocketAddress, Socket, ServerSocket>- Throws:
IOException
-
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
-