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
-
-
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, registerShutdownHook, reset, start, stop
-
-
-
-
Field Detail
-
service
protected final S service
-
-
Constructor Detail
-
RpcServer
public RpcServer(ServerConfig config) throws IOException
- Throws:
IOException
-
RpcServer
public RpcServer(ServerConfig config, S service) throws IOException
- Throws:
IOException
-
-
Method Detail
-
service
public final S service()
-
createSession
public RpcSession<S,?> createSession(Socket socket) throws RejectedSessionException
- Overrides:
createSessionin classServer- Throws:
RejectedSessionException
-
-