|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.xnio.nio.NioPipeSourceChannelImpl
public final class NioPipeSourceChannelImpl
Constructor Summary | |
---|---|
NioPipeSourceChannelImpl(java.nio.channels.Pipe.SourceChannel channel,
IoHandler<? super StreamSourceChannel> handler,
NioXnio nioXnio,
java.io.Closeable mbeanHandle)
|
Method Summary | ||
---|---|---|
void |
awaitReadable()
Block until this channel becomes readable again. |
|
void |
awaitReadable(long time,
java.util.concurrent.TimeUnit timeUnit)
Block until this channel becomes readable again, or until the timeout expires. |
|
void |
close()
|
|
|
getOption(ChannelOption<T> option)
Get the value of a channel option. |
|
java.util.Set<ChannelOption<?>> |
getOptions()
Get the options that may be set on this channel. |
|
boolean |
isOpen()
|
|
int |
read(java.nio.ByteBuffer dst)
|
|
long |
read(java.nio.ByteBuffer[] dsts)
|
|
long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
|
|
void |
resumeReads()
Resume reads on this channel. |
|
|
setOption(ChannelOption<T> option,
T value)
Set an option for this channel. |
|
void |
shutdownReads()
Places this readable channel at "end of stream". |
|
void |
suspendReads()
Suspend further reads on this channel. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NioPipeSourceChannelImpl(java.nio.channels.Pipe.SourceChannel channel, IoHandler<? super StreamSourceChannel> handler, NioXnio nioXnio, java.io.Closeable mbeanHandle) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
java.io.IOException
public long read(java.nio.ByteBuffer[] dsts) throws java.io.IOException
read
in interface java.nio.channels.ScatteringByteChannel
java.io.IOException
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException
read
in interface java.nio.channels.ScatteringByteChannel
java.io.IOException
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.nio.channels.Channel
java.io.IOException
public void suspendReads()
SuspendableReadChannel
IoReadHandler.handleReadable(java.nio.channels.Channel)
method will not
be called until reads are resumed.
suspendReads
in interface SuspendableReadChannel
public void resumeReads()
SuspendableReadChannel
IoReadHandler.handleReadable(java.nio.channels.Channel)
method will be
called as soon as there is data available to be read.
resumeReads
in interface SuspendableReadChannel
public void shutdownReads() throws java.io.IOException
SuspendableReadChannel
shutdownReads
in interface SuspendableReadChannel
java.io.IOException
- if an I/O error occurspublic void awaitReadable() throws java.io.IOException
SuspendableReadChannel
awaitReadable
in interface SuspendableReadChannel
java.io.IOException
- if an I/O error occurspublic void awaitReadable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException
SuspendableReadChannel
awaitReadable
in interface SuspendableReadChannel
time
- the time to waittimeUnit
- the time unit
java.io.IOException
- if an I/O error occurspublic <T> T getOption(ChannelOption<T> option) throws UnsupportedOptionException, java.io.IOException
Configurable
getOption
in interface Configurable
T
- the type of the option valueoption
- the option to get
UnsupportedOptionException
- if the option is not supported by this channel
java.io.IOException
- if an I/O error occurred when reading the optionpublic <T> Configurable setOption(ChannelOption<T> option, T value) throws java.lang.IllegalArgumentException, java.io.IOException
Configurable
setOption
in interface Configurable
T
- the type of the option valueoption
- the option to setvalue
- the value of the option to set
UnsupportedOptionException
- if the option is not supported by this channel
java.lang.IllegalArgumentException
- if the value is not acceptable for this option
java.io.IOException
- if an I/O error occured when modifying the optionpublic java.util.Set<ChannelOption<?>> getOptions()
Configurable
getOptions
in interface Configurable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |