@Service public class PowerTransportService extends Object implements TransportService, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
| 构造器和说明 |
|---|
PowerTransportService(org.springframework.core.env.Environment environment) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
Map<String,ProtocolInfo> |
allProtocols()
当前支持的全部协议
|
<T> CompletionStage<T> |
ask(String protocol,
tech.powerjob.remote.framework.base.URL url,
tech.powerjob.common.PowerSerializable request,
Class<T> clz) |
ProtocolInfo |
defaultProtocol()
自用地址,用于维护 server -> appId 和 server 间通讯
4.3.0 前为 ActorSystem Address(ip:10086)
4.3.0 后 PowerJob 将主协议切换为自由协议,默认使用 HTTP address (ip:10010)
|
void |
destroy() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
tell(String protocol,
tech.powerjob.remote.framework.base.URL url,
tech.powerjob.common.PowerSerializable request) |
public PowerTransportService(org.springframework.core.env.Environment environment)
public ProtocolInfo defaultProtocol()
TransportServicedefaultProtocol 在接口中 TransportServicepublic Map<String,ProtocolInfo> allProtocols()
TransportServiceallProtocols 在接口中 TransportServicepublic void tell(String protocol, tech.powerjob.remote.framework.base.URL url, tech.powerjob.common.PowerSerializable request)
tell 在接口中 TransportServicepublic <T> CompletionStage<T> ask(String protocol, tech.powerjob.remote.framework.base.URL url, tech.powerjob.common.PowerSerializable request, Class<T> clz) throws tech.powerjob.remote.framework.base.RemotingException
ask 在接口中 TransportServicetech.powerjob.remote.framework.base.RemotingExceptionpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2023. All rights reserved.