public abstract class AbstractSessionSocketStream extends Object implements SessionSocketStream
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BIGPIPE_ROLE_PUB
发布消息角色
|
static int |
BIGPIPE_ROLE_SUB
订阅消息角色
|
| 构造器和说明 |
|---|
AbstractSessionSocketStream() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract void |
afterCreateSession() |
protected abstract Socket |
buildSocketIfNotExist()
创建通信的socket对象。
|
void |
connectSession(PipeRuntime pipeRuntime,
PipeletInfo pipeletInfo)
构建session
|
protected abstract Receiver |
getReceiver()
|
protected abstract int |
getRole()
|
protected abstract TransportStrategy |
getTransStrategy()
获取配置的传输控制策略
|
static BigpipePacket |
parseCommand(ByteBuffer read)
解析读取到的返回信息
|
public static final int BIGPIPE_ROLE_PUB
public static final int BIGPIPE_ROLE_SUB
public void connectSession(PipeRuntime pipeRuntime, PipeletInfo pipeletInfo) throws IOException
SessionSocketStreamconnectSession 在接口中 SessionSocketStreampipeRuntime - PipeRuntime对象,描述运行时状态pipeletInfo - PipeletInfo对象,描述配置的pipelet相关信息IOException - 网络异常protected abstract Socket buildSocketIfNotExist()
Socket对象protected abstract TransportStrategy getTransStrategy()
TransportStrategy传输控制策略对象protected abstract int getRole()
BIGPIPE_ROLE_PUB=4 发布消息角色BIGPIPE_ROLE_SUB=5 订阅消息角色protected abstract void afterCreateSession()
throws IOException
IOExceptionpublic static BigpipePacket parseCommand(ByteBuffer read) throws com.google.protobuf.InvalidProtocolBufferException
read - 读取到的数据com.google.protobuf.InvalidProtocolBufferException - 异常Copyright © 2017. All rights reserved.