| 程序包 | 说明 |
|---|---|
| com.bfd.harpc.client | |
| com.bfd.harpc.config | |
| com.bfd.harpc.config.spring | |
| com.bfd.harpc.main | |
| com.bfd.harpc.registry | |
| com.bfd.harpc.server.avro | |
| com.bfd.harpc.server.thrift |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
Invoker.invoke(Method method,
Object[] args)
调用
|
Object |
DefaultInvoker.invoke(Method method,
Object[] args) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ServerConfig.check() |
void |
RegistryConfig.check() |
void |
IConfigCheck.check()
检查配置
配置非法时,抛出异常 RpcException
|
void |
ClientConfig.check() |
void |
ServerConfig.export(RegistryConfig registryConfig)
暴露服务
|
org.apache.curator.framework.CuratorFramework |
RegistryConfig.obtainZkClient()
获取zkClient
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ServerBean.export()
暴露服务
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Server.start()
启动服务
注意:本函数属于异步启动,如需要保持服务一直运行,需要主动阻塞主线程。 |
| 构造器和说明 |
|---|
Client(String[] configs)
配置文件路径说明:
1. |
Client(String[] configs,
RegistryConfig registryConfig)
该构造函数重载
Client.Client(String[]),目的是复用RegistryConfig 使用时参考类似如下的代码:
Client<TObject> client= new Client<TObject>(configs);
Client<TObject> client1= new Client<TObject>(configs1,client.getRegistryConfig());
|
Server(String[] configs,
Object impl)
配置文件路径说明:
1. |
Server(String[] configs,
Object impl,
RegistryConfig registryConfig)
该构造函数重载
Server.Server(String[], Object),目的是复用RegistryConfig 使用时参考类似如下的代码:
Server server= new Server(configs,impl);
Server server1= new Server(configs1,server.getRegistryConfig());
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ZkServerRegistry.register(String config) |
void |
ZkClientRegistry.register(String config) |
void |
IRegistry.register(String config)
注册
包括:provider和client |
void |
DefaultRegistry.register(String config) |
| 构造器和说明 |
|---|
AvroServer(org.apache.avro.ipc.Responder responder,
ServerNode serverNode,
int maxWorkerThreads,
int minWorkerThreads,
RpcMonitor monitor) |
| 构造器和说明 |
|---|
ThriftServer(org.apache.thrift.TProcessor processor,
ServerNode serverNode,
int maxWorkerThreads,
int minWorkerThreads,
RpcMonitor monitor) |
TServerThread(org.apache.thrift.TProcessor processor,
ServerNode serverNode,
int maxWorkerThreads,
int minWorkerThreads,
RpcMonitor monitor) |
Copyright © 2015 Baifendian Corporation. All rights reserved.