@Extension(value="bolt") public class BoltServer extends Object implements Server
Destroyable.DestroyHook| 限定符和类型 | 字段和说明 |
|---|---|
protected ThreadPoolExecutor |
bizThreadPool
业务线程池
|
protected BoltServerProcessor |
boltServerProcessor
BoltServerProcessor
|
protected Map<String,Invoker> |
invokerMap
Invoker列表,接口--> Invoker
|
protected com.alipay.remoting.RemotingServer |
remotingServer
Bolt服务端
|
protected ServerConfig |
serverConfig
服务端配置
|
protected boolean |
started
是否已经启动
|
| 构造器和说明 |
|---|
BoltServer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
销毁接口
|
void |
destroy(Destroyable.DestroyHook hook)
Do destroy with hook.
|
Invoker |
findInvoker(String serviceName)
找到服务端Invoker
|
ThreadPoolExecutor |
getBizThreadPool()
得到业务线程池
|
boolean |
hasNoEntry()
是否还绑定了服务(没有可以销毁)
|
void |
init(ServerConfig serverConfig)
启动server端
|
protected com.alipay.remoting.RemotingServer |
initRemotingServer() |
protected ThreadPoolExecutor |
initThreadPool(ServerConfig serverConfig) |
boolean |
isStarted()
是否已经启动
|
void |
registerProcessor(ProviderConfig providerConfig,
Invoker instance)
注册服务
|
void |
start()
启动
|
void |
stop()
停止
|
void |
unRegisterProcessor(ProviderConfig providerConfig,
boolean closeIfNoEntry)
取消注册服务
|
protected volatile boolean started
protected com.alipay.remoting.RemotingServer remotingServer
protected ServerConfig serverConfig
protected BoltServerProcessor boltServerProcessor
protected ThreadPoolExecutor bizThreadPool
public void init(ServerConfig serverConfig)
Serverprotected ThreadPoolExecutor initThreadPool(ServerConfig serverConfig)
protected com.alipay.remoting.RemotingServer initRemotingServer()
public boolean hasNoEntry()
ServerhasNoEntry 在接口中 Serverpublic void registerProcessor(ProviderConfig providerConfig, Invoker instance)
ServerregisterProcessor 在接口中 ServerproviderConfig - 服务提供者配置instance - 服务提供者实例public void unRegisterProcessor(ProviderConfig providerConfig, boolean closeIfNoEntry)
ServerunRegisterProcessor 在接口中 ServerproviderConfig - 服务提供者配置closeIfNoEntry - 如果没有注册服务,最后一个关闭Serverpublic void destroy()
Destroyabledestroy 在接口中 Destroyablepublic void destroy(Destroyable.DestroyHook hook)
Destroyabledestroy 在接口中 Destroyablehook - DestroyHookpublic ThreadPoolExecutor getBizThreadPool()
Copyright © 2008–2018 The Ant Financial. All rights reserved.