public class RpcServer extends InterceptCommunicationServer
bootstrap, bossGroup, customThreadPools, host, port, protocol, rpcServerOptions, serverStatus, serviceList, serviceManager, threadPool, timeoutTimer, workerGroup| Constructor and Description |
|---|
RpcServer(int port) |
RpcServer(int port,
RpcServerOptions options) |
RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors) |
RpcServer(String host,
int port) |
RpcServer(String host,
int port,
RpcServerOptions options) |
RpcServer(String host,
int port,
RpcServerOptions options,
List<Interceptor> interceptors) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isShutdown() |
void |
registerService(Object service,
Class targetClass,
NamingOptions namingOptions,
RpcServerOptions serverOptions)
register service which can be accessed by client
|
boolean |
shutdown() |
void |
start() |
executegetBootstrap, getBossGroup, getCustomThreadPools, getHost, getPort, getProtocol, getRpcServerOptions, getServerStatus, getServiceList, getServiceManager, getStop, getThreadPool, getTimeoutTimer, getWorkerGroup, registerService, registerService, registerService, registerService, sendServerPush, setProtocolpublic RpcServer(int port)
public RpcServer(String host, int port)
public RpcServer(int port,
RpcServerOptions options)
public RpcServer(String host, int port, RpcServerOptions options)
public RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors)
public RpcServer(String host, int port, RpcServerOptions options, List<Interceptor> interceptors)
public void registerService(Object service, Class targetClass, NamingOptions namingOptions, RpcServerOptions serverOptions)
registerService in class CommunicationServerservice - the service object which implement rpc interface.namingOptions - register center infoserverOptions - service own custom RpcServerOptions
if not null, the service will not use the shared thread pool.public void start()
start in class CommunicationServerpublic boolean shutdown()
shutdown in class CommunicationServerpublic boolean isShutdown()
isShutdown in class CommunicationServerCopyright © 2022 Baidu, Inc.. All rights reserved.