|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.channel.AbstractChannel
org.jboss.netty.channel.AbstractServerChannel
public abstract class AbstractServerChannel
A skeletal server-side Channel implementation. A server-side
Channel does not allow the following operations:
connect(SocketAddress)disconnect()getInterestOps()setInterestOps(int)write(Object)write(Object, SocketAddress)
| Field Summary |
|---|
| Fields inherited from interface org.jboss.netty.channel.Channel |
|---|
OP_NONE, OP_READ, OP_READ_WRITE, OP_WRITE |
| Constructor Summary | |
|---|---|
protected |
AbstractServerChannel(ChannelFactory factory,
ChannelPipeline pipeline,
ChannelSink sink)
Creates a new instance. |
| Method Summary | |
|---|---|
ChannelFuture |
connect(java.net.SocketAddress remoteAddress)
Connects this channel to the specified remote address asynchronously. |
ChannelFuture |
disconnect()
Disconnects this channel from the current remote address asynchronously. |
int |
getInterestOps()
Returns the current interestOps of this channel. |
boolean |
isConnected()
Returns true if and only if this channel is connected to a
remote address. |
ChannelFuture |
setInterestOps(int interestOps)
Changes the interestOps of this channel asynchronously. |
protected void |
setInterestOpsNow(int interestOps)
Sets the interestOps property of this channel
immediately. |
ChannelFuture |
write(java.lang.Object message)
Sends a message to this channel asynchronously. |
ChannelFuture |
write(java.lang.Object message,
java.net.SocketAddress remoteAddress)
Sends a message to this channel asynchronously. |
| Methods inherited from class org.jboss.netty.channel.AbstractChannel |
|---|
bind, close, compareTo, equals, getCloseFuture, getFactory, getId, getParent, getPipeline, getSucceededFuture, getUnsupportedOperationFuture, hashCode, isOpen, isReadable, isWritable, setClosed, setReadable, toString, unbind |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.netty.channel.Channel |
|---|
bind, close, getCloseFuture, getConfig, getFactory, getId, getLocalAddress, getParent, getPipeline, getRemoteAddress, isBound, isOpen, isReadable, isWritable, setReadable, unbind |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
protected AbstractServerChannel(ChannelFactory factory,
ChannelPipeline pipeline,
ChannelSink sink)
factory - the factory which created this channelpipeline - the pipeline which is going to be attached to this channelsink - the sink which will receive downstream events from the pipeline
and send upstream events to the pipeline| Method Detail |
|---|
public ChannelFuture connect(java.net.SocketAddress remoteAddress)
Channel
connect in interface Channelconnect in class AbstractChannelremoteAddress - where to connect
ChannelFuture which will be notified when the
connection request succeeds or failspublic ChannelFuture disconnect()
Channel
disconnect in interface Channeldisconnect in class AbstractChannelChannelFuture which will be notified when the
disconnection request succeeds or failspublic int getInterestOps()
ChannelinterestOps of this channel.
getInterestOps in interface ChannelgetInterestOps in class AbstractChannelChannel.OP_NONE, Channel.OP_READ, Channel.OP_WRITE, or
Channel.OP_READ_WRITEpublic ChannelFuture setInterestOps(int interestOps)
ChannelinterestOps of this channel asynchronously.
setInterestOps in interface ChannelsetInterestOps in class AbstractChannelinterestOps - the new interestOps
ChannelFuture which will be notified when the
interestOps change request succeeds or failsprotected void setInterestOpsNow(int interestOps)
AbstractChannelinterestOps property of this channel
immediately. This method is intended to be called by an internal
component - please do not call it unless you know what you are doing.
setInterestOpsNow in class AbstractChannelpublic ChannelFuture write(java.lang.Object message)
ChannelDatagramChannel)
and is not connected yet, you have to call Channel.write(Object, SocketAddress)
instead. Otherwise, the write request will fail with
NotYetConnectedException and an 'exceptionCaught' event
will be triggered.
write in interface Channelwrite in class AbstractChannelmessage - the message to write
ChannelFuture which will be notified when the
write request succeeds or fails
public ChannelFuture write(java.lang.Object message,
java.net.SocketAddress remoteAddress)
ChannelDatagramChannel)
and is not connected yet, you must specify non-null address. Otherwise,
the write request will fail with NotYetConnectedException and
an 'exceptionCaught' event will be triggered.
write in interface Channelwrite in class AbstractChannelmessage - the message to writeremoteAddress - where to send the specified message.
This method is identical to Channel.write(Object)
if null is specified here.
ChannelFuture which will be notified when the
write request succeeds or failspublic boolean isConnected()
Channeltrue if and only if this channel is connected to a
remote address.
isConnected in interface Channel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||