|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.xnio.nio.NioPipeSinkChannelImpl
public final class NioPipeSinkChannelImpl
Constructor Summary | |
---|---|
NioPipeSinkChannelImpl(java.nio.channels.Pipe.SinkChannel channel,
IoHandler<? super StreamSinkChannel> handler,
NioXnio nioXnio,
java.util.concurrent.atomic.AtomicLong bytes,
java.util.concurrent.atomic.AtomicLong messages,
java.io.Closeable mbeanHandle)
|
Method Summary | ||
---|---|---|
void |
awaitWritable()
Block until this channel becomes writable again. |
|
void |
awaitWritable(long time,
java.util.concurrent.TimeUnit timeUnit)
Block until this channel becomes writable 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()
|
|
void |
resumeWrites()
Resume writes on this channel. |
|
|
setOption(ChannelOption<T> option,
T value)
Set an option for this channel. |
|
void |
shutdownWrites()
Indicate that writing is complete for this channel. |
|
void |
suspendWrites()
Suspend further writes on this channel. |
|
java.lang.String |
toString()
|
|
int |
write(java.nio.ByteBuffer dst)
|
|
long |
write(java.nio.ByteBuffer[] dsts)
|
|
long |
write(java.nio.ByteBuffer[] dsts,
int offset,
int length)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NioPipeSinkChannelImpl(java.nio.channels.Pipe.SinkChannel channel, IoHandler<? super StreamSinkChannel> handler, NioXnio nioXnio, java.util.concurrent.atomic.AtomicLong bytes, java.util.concurrent.atomic.AtomicLong messages, java.io.Closeable mbeanHandle) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public int write(java.nio.ByteBuffer dst) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
java.io.IOException
public long write(java.nio.ByteBuffer[] dsts) throws java.io.IOException
write
in interface java.nio.channels.GatheringByteChannel
java.io.IOException
public long write(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException
write
in interface java.nio.channels.GatheringByteChannel
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 suspendWrites()
SuspendableWriteChannel
IoWriteHandler.handleWritable(java.nio.channels.Channel)
method will not
be called until writes are resumed.
suspendWrites
in interface SuspendableWriteChannel
public void resumeWrites()
SuspendableWriteChannel
IoWriteHandler.handleWritable(java.nio.channels.Channel)
method will be
called as soon as there is space in the channel's transmit buffer.
resumeWrites
in interface SuspendableWriteChannel
public void shutdownWrites() throws java.io.IOException
SuspendableWriteChannel
shutdownWrites
in interface SuspendableWriteChannel
java.io.IOException
- if an I/O error occurspublic void awaitWritable() throws java.io.IOException
SuspendableWriteChannel
awaitWritable
in interface SuspendableWriteChannel
java.io.IOException
- if an I/O error occurspublic void awaitWritable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException
SuspendableWriteChannel
awaitWritable
in interface SuspendableWriteChannel
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 java.util.Set<ChannelOption<?>> getOptions()
Configurable
getOptions
in interface Configurable
public <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.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 |