|
JBoss Remoting 3 3.2.13.GA-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Channel
The most basic level of communications in a Remoting connection. A channel simply sends and receives messages. No request/reply correlation is performed. Messages are received in the order that they are written; however, multiple messages may flow in or out concurrently on a single channel. In particular, a later message may complete before an earlier message does.
Nested Class Summary | |
---|---|
static interface |
Channel.Receiver
A handler for an incoming message. |
Nested classes/interfaces inherited from interface org.jboss.remoting3.HandleableCloseable |
---|
HandleableCloseable.Key |
Method Summary | ||
---|---|---|
void |
close()
Close this channel. |
|
Connection |
getConnection()
Get the connection associated with this channel. |
|
|
getOption(org.xnio.Option<T> option)
Get the value of a channel option. |
|
void |
receiveMessage(Channel.Receiver handler)
Initiate processing of the next message, when it comes in. |
|
|
setOption(org.xnio.Option<T> option,
T value)
Set an option for this channel. |
|
boolean |
supportsOption(org.xnio.Option<?> option)
Determine whether an option is supported on this channel. |
|
MessageOutputStream |
writeMessage()
Write a new message on to this channel, blocking if necessary. |
|
void |
writeShutdown()
Send an end-of-messages signal to the remote side. |
Methods inherited from interface org.jboss.remoting3.Attachable |
---|
getAttachments |
Methods inherited from interface org.jboss.remoting3.HandleableCloseable |
---|
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, closeAsync |
Method Detail |
---|
Connection getConnection()
MessageOutputStream writeMessage() throws IOException
IOException
- if a new message cannot be writtenvoid writeShutdown() throws IOException
IOException
- if the message could not be writtenvoid receiveMessage(Channel.Receiver handler)
handler
- the handler for the next incoming messageboolean supportsOption(org.xnio.Option<?> option)
supportsOption
in interface org.xnio.channels.Configurable
option
- the option
true
if it is supported<T> T getOption(org.xnio.Option<T> option)
getOption
in interface org.xnio.channels.Configurable
T
- the type of the option valueoption
- the option to get
null
if it is not set<T> T setOption(org.xnio.Option<T> option, T value) throws IllegalArgumentException
setOption
in interface org.xnio.channels.Configurable
T
- the type of the option valueoption
- the option to setvalue
- the value of the option to set
IllegalArgumentException
- if the value is not acceptable for this optionvoid close() throws IOException
close
in interface Closeable
close
in interface HandleableCloseable<Channel>
IOException
- if a failure occurs during close
|
JBoss Remoting 3 3.2.13.GA-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |