public class EmbeddedChannel extends AttributeChannel<EmbeddedChannel>
SoChannel implementations that are used in an embedded fashion.| 限定符和类型 | 字段和说明 |
|---|---|
protected PipeContext |
pipeCtx |
protected net.hasor.neta.handler.PipeChainRoot |
pipeStack |
| 构造器和说明 |
|---|
EmbeddedChannel(boolean asServer,
PipelineFactory stackFactory,
EmbeddedSoContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearRcvError()
Clear the RcvError status.
|
void |
clearSndError()
Clear the SndError status.
|
net.hasor.cobble.concurrent.future.Future<EmbeddedChannel> |
close()
close this channel.
|
net.hasor.cobble.concurrent.future.Future<EmbeddedChannel> |
closeNow()
close this channel now.
|
<T> T |
findPipeContext(Class<T> serviceType)
Get the attachment for
PipeContext |
long |
getChannelID()
channel id
|
SoContext |
getContext()
get context
|
long |
getCreatedTime()
channel accept time
|
long |
getLastActiveTime()
The last time data was received or sent
|
SocketAddress |
getLocalAddr()
local
SocketAddress |
PipeStatistical |
getPipeStatistical()
Get protocol stack statistics
|
int |
getRcvDownSize()
read messages limit from the RCV_DOWN of this
SoChannel. |
Throwable |
getRcvError()
Get the possible received data protocol layer error
|
SocketAddress |
getRemoteAddr()
get remote address of the channel
|
int |
getSndDownSize()
read messages limit from the SND_DOWN of this
SoChannel. |
Throwable |
getSndError()
Get the possible send data protocol layer error
|
boolean |
hasRcvError()
Receive data protocol layer error
|
boolean |
hasSndError()
send data protocol layer error
|
boolean |
isClient()
a connect
NetChannel |
boolean |
isClose()
return close status.
|
boolean |
isListen()
|
boolean |
isServer()
an accept
NetChannel |
Object |
readRcvDown()
read messages from the RCV_DOWN of this
SoChannel. |
Object[] |
readRcvDownArray()
read messages from the RCV_DOWN of this
SoChannel. |
Object |
readSndDown()
read messages from the SND_DOWN of this
SoChannel. |
Object[] |
readSndDownArray(int readSize)
read messages from the SND_DOWN of this
SoChannel. |
<T> void |
writeRcvUp(String pipeName,
T object)
Write messages to the RCV_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
<T> void |
writeRcvUp(T object)
Write messages to the RCV_UP of this
SoChannel. |
<T> void |
writeRcvUpArray(String pipeName,
T[] object)
Write messages to the RCV_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
<T> void |
writeRcvUpArray(T[] object)
Write messages to the RCV_UP of this
SoChannel. |
void |
writeRcvUpError(String pipeName,
Throwable e)
Write error to the RCV_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
void |
writeRcvUpError(Throwable e)
Write error to the RCV_UP of this
SoChannel. |
<T> void |
writeSndUp(String pipeName,
T object)
Write messages to the SND_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
<T> void |
writeSndUp(T object)
Write messages to the SND_UP of this
SoChannel. |
<T> void |
writeSndUpArray(String pipeName,
T[] object)
Write messages to the SND_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
<T> void |
writeSndUpArray(T[] object)
Write messages to the SND_UP of this
SoChannel. |
void |
writeSndUpError(String pipeName,
Throwable e)
Write error to the SND_UP of this
SoChannel, the message will only be sent to the specific protocol layer |
void |
writeSndUpError(Throwable e)
Write error to the SND_UP of this
SoChannel. |
getAttribute, setAttributeprotected final PipeContext pipeCtx
protected final net.hasor.neta.handler.PipeChainRoot pipeStack
public EmbeddedChannel(boolean asServer,
PipelineFactory stackFactory,
EmbeddedSoContext context)
public long getChannelID()
SoChannelpublic long getCreatedTime()
SoChannelpublic long getLastActiveTime()
SoChannelpublic boolean isListen()
SoChannelpublic boolean isServer()
SoChannelNetChannelpublic boolean isClient()
SoChannelNetChannelpublic SocketAddress getLocalAddr()
SoChannelSocketAddresspublic SocketAddress getRemoteAddr()
SoChannelpublic <T> T findPipeContext(Class<T> serviceType)
SoChannelPipeContextpublic net.hasor.cobble.concurrent.future.Future<EmbeddedChannel> close()
SoChannelThe SoChannel.closeNow() and SoChannel.close() methods are valid if they are called first
public net.hasor.cobble.concurrent.future.Future<EmbeddedChannel> closeNow()
SoChannelpublic boolean isClose()
SoChannelpublic PipeStatistical getPipeStatistical()
public <T> void writeRcvUp(T object)
SoChannel.object - the messages to be writtenpublic <T> void writeRcvUpArray(T[] object)
SoChannel.object - the messages to be writtenpublic <T> void writeRcvUp(String pipeName, T object)
SoChannel, the message will only be sent to the specific protocol layerobject - the messages to be writtenpublic <T> void writeRcvUpArray(String pipeName, T[] object)
SoChannel, the message will only be sent to the specific protocol layerobject - the messages to be writtenpublic void writeRcvUpError(Throwable e)
SoChannel.e - the messages to be writtenpublic void writeRcvUpError(String pipeName, Throwable e)
SoChannel, the message will only be sent to the specific protocol layere - the messages to be writtenpublic Object[] readRcvDownArray()
SoChannel.public int getRcvDownSize()
SoChannel.public boolean hasRcvError()
public Throwable getRcvError()
public void clearRcvError()
public <T> void writeSndUp(T object)
SoChannel.object - the messages to be writtenpublic <T> void writeSndUpArray(T[] object)
SoChannel.object - the messages to be writtenpublic <T> void writeSndUp(String pipeName, T object)
SoChannel, the message will only be sent to the specific protocol layerobject - the messages to be writtenpublic <T> void writeSndUpArray(String pipeName, T[] object)
SoChannel, the message will only be sent to the specific protocol layerobject - the messages to be writtenpublic void writeSndUpError(Throwable e)
SoChannel.e - the messages to be writtenpublic void writeSndUpError(String pipeName, Throwable e)
SoChannel, the message will only be sent to the specific protocol layere - the messages to be writtenpublic Object[] readSndDownArray(int readSize)
SoChannel.public int getSndDownSize()
SoChannel.public boolean hasSndError()
public Throwable getSndError()
public void clearSndError()
Copyright © 2022–2024. All rights reserved.