|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectorg.jboss.netty.channel.AbstractChannel
org.jboss.netty.channel.AbstractServerChannel
public abstract class AbstractServerChannel

一个服务端Channel脚架实现.一个服务端的Channel不允许以下操作:
connect(SocketAddress)disconnect()getInterestOps()setInterestOps(int)write(Object)write(Object, SocketAddress)
| 字段摘要 |
|---|
| 从接口 org.jboss.netty.channel.Channel 继承的字段 |
|---|
OP_NONE, OP_READ, OP_READ_WRITE, OP_WRITE |
| 方法摘要 | |
|---|---|
ChannelFuture |
connect(java.net.SocketAddress remoteAddress)
异步连接该通道到指定的远程地址. |
ChannelFuture |
disconnect()
异步从当前远程地址断开连接. |
int |
getInterestOps()
返回该通道当前的 interestOps. |
boolean |
isConnected()
只有该通道被连接到一个远程地址才返回 true. |
ChannelFuture |
setInterestOps(int interestOps)
异步改变该通道的 interestOps. |
ChannelFuture |
write(java.lang.Object message)
异步返送消息到该通道.如果该通道是使用无连接传输创建的(如. |
ChannelFuture |
write(java.lang.Object message,
java.net.SocketAddress remoteAddress)
异步发送消息到该通道.它有一个附加的参数允许用户使用指定的远程地址代替当前远程地址来发送消息. |
| 从类 org.jboss.netty.channel.AbstractChannel 继承的方法 |
|---|
bind, close, compareTo, equals, getCloseFuture, getFactory, getId, getParent, getPipeline, hashCode, isOpen, isReadable, isWritable, setReadable, toString, unbind |
| 从类 java.lang.Object 继承的方法 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| 从接口 org.jboss.netty.channel.Channel 继承的方法 |
|---|
bind, close, getCloseFuture, getConfig, getFactory, getId, getLocalAddress, getParent, getPipeline, getRemoteAddress, isBound, isOpen, isReadable, isWritable, setReadable, unbind |
| 从接口 java.lang.Comparable 继承的方法 |
|---|
compareTo |
| 方法详细信息 |
|---|
public ChannelFuture connect(java.net.SocketAddress remoteAddress)
Channel 复制的描述
Channel 中的 connectAbstractChannel 中的 connectremoteAddress - 连接的远程地址
ChannelFuturepublic ChannelFuture disconnect()
Channel 复制的描述
Channel 中的 disconnectAbstractChannel 中的 disconnectChannelFuturepublic int getInterestOps()
Channel 复制的描述interestOps.
Channel 中的 getInterestOpsAbstractChannel 中的 getInterestOpsChannel.OP_NONE, Channel.OP_READ, Channel.OP_WRITE, 或
Channel.OP_READ_WRITEpublic ChannelFuture setInterestOps(int interestOps)
Channel 复制的描述interestOps.
Channel 中的 setInterestOpsAbstractChannel 中的 setInterestOpsinterestOps - 新的interestOps
interestOps改变成功或失败时能接收到通知的ChannelFuturepublic ChannelFuture write(java.lang.Object message)
Channel 复制的描述DatagramChannel)并且还没有连接, 你必须使用
Channel.write(Object, SocketAddress)代替.否则,写请求会抛出
NotYetConnectedException并且'exceptionCaught'事件会被触发.
Channel 中的 writeAbstractChannel 中的 writemessage - 要写的消息
ChannelFuture
public ChannelFuture write(java.lang.Object message,
java.net.SocketAddress remoteAddress)
Channel 复制的描述DatagramChannel)创建且还没有连接,你必须指定一个非空的地址.否则,写请求会抛出
NotYetConnectedException并且'exceptionCaught'事件会被触发.
Channel 中的 writeAbstractChannel 中的 writemessage - 要写的消息remoteAddress - 消息要发送的远程地址.如果为null,则和方法Channel.write(Object)相同.
ChannelFuturepublic boolean isConnected()
Channel 复制的描述true.
Channel 中的 isConnected
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||