@Service public class SocketControlImpl extends Object implements SocketControl
| 构造器和说明 |
|---|
SocketControlImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
bindKey(io.netty.channel.ChannelHandlerContext ctx,
String key)
绑定key
|
void |
bindKey(io.netty.channel.Channel ctx,
String key)
绑定key
|
String |
getInstanceId()
获取服务的InstanceId
|
String |
getIpPort()
获取服务的IP和端口
|
String |
getKey(io.netty.channel.Channel channel)
获取key
|
String |
getKey(io.netty.channel.ChannelHandlerContext ctx)
获取key
|
String |
getModelName()
获取模块名称,也可以直接调用getIpPort()
|
String |
getServiceId()
获取服务的ServiceId
|
String |
getUniqueKey(io.netty.channel.Channel channel)
模块下连接的标示
|
String |
getUniqueKey(io.netty.channel.ChannelHandlerContext ctx)
模块下连接的标示
|
void |
resetHeartTime(io.netty.channel.Channel ctx,
int heartTime)
重置心跳时间
|
public String getIpPort()
SocketControlgetIpPort 在接口中 SocketControlpublic String getServiceId()
SocketControlgetServiceId 在接口中 SocketControlpublic String getInstanceId()
SocketControlgetInstanceId 在接口中 SocketControlpublic String getModelName()
SocketControlgetModelName 在接口中 SocketControlpublic String getUniqueKey(io.netty.channel.Channel channel)
SocketControlgetUniqueKey 在接口中 SocketControlpublic String getUniqueKey(io.netty.channel.ChannelHandlerContext ctx)
SocketControlgetUniqueKey 在接口中 SocketControlpublic void bindKey(io.netty.channel.ChannelHandlerContext ctx,
String key)
SocketControlbindKey 在接口中 SocketControlctx - 当前连接对象key - keypublic void bindKey(io.netty.channel.Channel ctx,
String key)
SocketControlbindKey 在接口中 SocketControlctx - 当前连接对象key - keypublic String getKey(io.netty.channel.Channel channel)
SocketControlgetKey 在接口中 SocketControlchannel - 当前链接对象public String getKey(io.netty.channel.ChannelHandlerContext ctx)
SocketControlgetKey 在接口中 SocketControlctx - 当前链接对象public void resetHeartTime(io.netty.channel.Channel ctx,
int heartTime)
SocketControlresetHeartTime 在接口中 SocketControlctx - 当前连接对象heartTime - 心跳时间(秒)Copyright © 2018. All rights reserved.