public class RpcServer extends Object
| 构造器和说明 |
|---|
RpcServer(int port) |
RpcServer(int port,
RpcServerOptions options) |
RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors) |
RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors,
NamingServiceFactory namingServiceFactory) |
RpcServer(int port,
RpcServerOptions options,
NamingServiceFactory namingServiceFactory) |
RpcServer(String host,
int port) |
RpcServer(String host,
int port,
RpcServerOptions options) |
RpcServer(String host,
int port,
RpcServerOptions options,
List<Interceptor> interceptors) |
RpcServer(String host,
int port,
RpcServerOptions options,
List<Interceptor> interceptors,
NamingServiceFactory namingServiceFactory) |
RpcServer(String host,
int port,
RpcServerOptions options,
NamingServiceFactory namingServiceFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
registerService(Object service) |
void |
registerService(Object service,
Class targetClass,
NamingOptions namingOptions,
RpcServerOptions serverOptions)
register service which can be accessed by client
|
void |
registerService(Object service,
NamingOptions namingOptions) |
void |
registerService(Object service,
RpcServerOptions serverOptions) |
void |
shutdown() |
void |
start() |
public RpcServer(int port)
public RpcServer(int port,
RpcServerOptions options)
public RpcServer(String host, int port)
public RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors)
public RpcServer(String host, int port, RpcServerOptions options)
public RpcServer(String host, int port, RpcServerOptions options, List<Interceptor> interceptors)
public RpcServer(int port,
RpcServerOptions options,
NamingServiceFactory namingServiceFactory)
public RpcServer(String host, int port, RpcServerOptions options, NamingServiceFactory namingServiceFactory)
public RpcServer(int port,
RpcServerOptions options,
List<Interceptor> interceptors,
NamingServiceFactory namingServiceFactory)
public RpcServer(String host, int port, RpcServerOptions options, List<Interceptor> interceptors, NamingServiceFactory namingServiceFactory)
public void registerService(Object service)
public void registerService(Object service, NamingOptions namingOptions)
public void registerService(Object service, RpcServerOptions serverOptions)
public void registerService(Object service, Class targetClass, NamingOptions namingOptions, RpcServerOptions serverOptions)
service - 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()
public void shutdown()
Copyright © 2019 Baidu, Inc.. All rights reserved.