public final class PrimaryServer extends AbstractServer<PrimaryServer> implements Initializable<PrimaryServer>
AbstractServer which only handles connections. It contains a collection of
WorkerServers, and when an incoming connection takes place, it forwards the request
to some server from the collection with round-robin algorithm.AbstractServer.AcceptFilteracceptOnce, DEFAULT_SERVER_SOCKET_SETTINGS, DEFAULT_SOCKET_SETTINGS, eventloop, listenAddresses, logger, serverSocketSettings, socketSettings, sslListenAddresses| Modifier and Type | Method and Description |
|---|---|
static PrimaryServer |
create(Eventloop primaryEventloop,
List<? extends WorkerServer> workerServers) |
static PrimaryServer |
create(Eventloop primaryEventloop,
WorkerServer... workerServer) |
protected AsyncTcpSocket.EventHandler |
createSocketHandler(AsyncTcpSocket asyncTcpSocket) |
protected WorkerServer |
getWorkerServer() |
String |
toString() |
close, closeFuture, doAccept, getAccepts, getAcceptsSsl, getEventloop, getFilteredAccepts, getServerSocketSettings, getSocketInspector, getSocketSettings, getSocketStats, getSocketStatsSsl, isRunning, listen, onAccept, onClose, onFilteredAccept, onListen, withAcceptFilter, withAcceptOnce, withAcceptOnce, withListenAddress, withListenAddresses, withListenAddresses, withListenPort, withLogger, withServerSocketSettings, withSocketSettings, withSslListenAddress, withSslListenAddresses, withSslListenAddresses, withSslListenPortclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitialize, initializegetSmoothingWindow, resetStats, setSmoothingWindowpublic static PrimaryServer create(Eventloop primaryEventloop, List<? extends WorkerServer> workerServers)
public static PrimaryServer create(Eventloop primaryEventloop, WorkerServer... workerServer)
protected AsyncTcpSocket.EventHandler createSocketHandler(AsyncTcpSocket asyncTcpSocket)
createSocketHandler in class AbstractServer<PrimaryServer>protected WorkerServer getWorkerServer()
getWorkerServer in class AbstractServer<PrimaryServer>public String toString()
toString in class AbstractServer<PrimaryServer>Copyright © 2019. All rights reserved.