@Extension(value="rest") public class RestServer extends Object implements Server
Destroyable.DestroyHook| 限定符和类型 | 字段和说明 |
|---|---|
protected SofaNettyJaxrsServer |
httpServer
Bolt服务端
|
protected AtomicInteger |
invokerCnt
invoker数量
|
protected ServerConfig |
serverConfig
服务端配置
|
protected boolean |
started
是否已经启动
|
| 构造器和说明 |
|---|
RestServer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
销毁接口
|
void |
destroy(Destroyable.DestroyHook hook)
Do destroy with hook.
|
boolean |
hasNoEntry()
是否还绑定了服务(没有可以销毁)
|
void |
init(ServerConfig serverConfig)
启动server端
|
boolean |
isStarted()
是否已经启动
|
void |
registerProcessor(ProviderConfig providerConfig,
Invoker instance)
注册服务
|
void |
start()
启动
|
void |
stop()
停止
|
void |
unRegisterProcessor(ProviderConfig providerConfig,
boolean closeIfNoEntry)
取消注册服务
|
protected volatile boolean started
protected SofaNettyJaxrsServer httpServer
protected ServerConfig serverConfig
protected AtomicInteger invokerCnt
public void init(ServerConfig serverConfig)
Serverpublic 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 - DestroyHookCopyright © 2008–2018 The Ant Financial. All rights reserved.