Package one.nio.rpc
Class RpcServer<S>
- java.lang.Object
-
- one.nio.server.Server
-
- one.nio.rpc.RpcServer<S>
-
- All Implemented Interfaces:
ServerMXBean
public class RpcServer<S> extends Server
-
-
Field Summary
Fields Modifier and Type Field Description protected Sservice-
Fields inherited from class one.nio.server.Server
acceptor, cleanup, closeSessions, pinAcceptors, port, selectors, useWorkers, workers
-
-
Constructor Summary
Constructors Constructor Description RpcServer(ServerConfig config)RpcServer(ServerConfig config, S service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RpcSession<S,?>createSession(Socket socket)Sservice()-
Methods inherited from class one.nio.server.Server
asyncExecute, getAcceptedSessions, getConnections, getKeepAlive, getQueueAvgBytes, getQueueAvgLength, getQueueMaxBytes, getQueueMaxLength, getRejectedSessions, getRequestsProcessed, getRequestsRejected, getSelectorAvgReady, getSelectorCount, getSelectorMaxReady, getSelectorOperations, getSelectorSessions, getWorkers, getWorkersActive, getWorkersUsed, incRequestsProcessed, incRequestsRejected, reconfigure, register, register, registerShutdownHook, reset, start, stop
-
-
-
-
Field Detail
-
service
protected final S service
-
-
Constructor Detail
-
RpcServer
public RpcServer(ServerConfig config) throws java.io.IOException
- Throws:
java.io.IOException
-
RpcServer
public RpcServer(ServerConfig config, S service) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
service
public final S service()
-
createSession
public RpcSession<S,?> createSession(Socket socket) throws RejectedSessionException
- Overrides:
createSessionin classServer- Throws:
RejectedSessionException
-
-