W - Type of data that can be written on the associated channel.public interface ChannelOperations<W>
| Modifier and Type | Field and Description |
|---|---|
static rx.functions.Func1<byte[],java.lang.Boolean> |
FLUSH_ON_EACH_BYTES
Flush selector that always returns true.
|
static rx.functions.Func1<io.netty.channel.FileRegion,java.lang.Boolean> |
FLUSH_ON_EACH_FILE_REGION
Flush selector that always returns true.
|
static rx.functions.Func1<java.lang.String,java.lang.Boolean> |
FLUSH_ON_EACH_STRING
Flush selector that always returns true.
|
static io.netty.util.AttributeKey<java.lang.Boolean> |
FLUSH_ONLY_ON_READ_COMPLETE |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<java.lang.Void> |
close()
Flushes any pending writes and closes the connection.
|
rx.Observable<java.lang.Void> |
close(boolean flush)
Closes this channel after flushing all pending writes.
|
rx.Observable<java.lang.Void> |
closeListener()
Returns an
Observable that completes when this connection is closed. |
void |
closeNow()
Closes the connection immediately.
|
void |
flush()
Flushes any pending writes on this connection by calling
Channel.flush(). |
<WW> ChannelOperations<WW> |
transformWrite(AllocatingTransformer<WW,W> transformer)
Modifies the underneath channel to enable writing new type of objects that will be transformed using the passed
transformer |
rx.Observable<java.lang.Void> |
write(rx.Observable<W> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel. |
rx.Observable<java.lang.Void> |
write(rx.Observable<W> msgs,
rx.functions.Func1<W,java.lang.Boolean> flushSelector)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . |
rx.Observable<java.lang.Void> |
writeAndFlushOnEach(rx.Observable<W> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. |
rx.Observable<java.lang.Void> |
writeBytes(rx.Observable<byte[]> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel. |
rx.Observable<java.lang.Void> |
writeBytes(rx.Observable<byte[]> msgs,
rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . |
rx.Observable<java.lang.Void> |
writeBytesAndFlushOnEach(rx.Observable<byte[]> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. |
rx.Observable<java.lang.Void> |
writeFileRegion(rx.Observable<io.netty.channel.FileRegion> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel. |
rx.Observable<java.lang.Void> |
writeFileRegion(rx.Observable<io.netty.channel.FileRegion> msgs,
rx.functions.Func1<io.netty.channel.FileRegion,java.lang.Boolean> flushSelector)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . |
rx.Observable<java.lang.Void> |
writeFileRegionAndFlushOnEach(rx.Observable<io.netty.channel.FileRegion> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. |
rx.Observable<java.lang.Void> |
writeString(rx.Observable<java.lang.String> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel. |
rx.Observable<java.lang.Void> |
writeString(rx.Observable<java.lang.String> msgs,
rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . |
rx.Observable<java.lang.Void> |
writeStringAndFlushOnEach(rx.Observable<java.lang.String> msgs)
On subscription of the returned
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. |
static final rx.functions.Func1<java.lang.String,java.lang.Boolean> FLUSH_ON_EACH_STRING
static final rx.functions.Func1<byte[],java.lang.Boolean> FLUSH_ON_EACH_BYTES
static final rx.functions.Func1<io.netty.channel.FileRegion,java.lang.Boolean> FLUSH_ON_EACH_FILE_REGION
static final io.netty.util.AttributeKey<java.lang.Boolean> FLUSH_ONLY_ON_READ_COMPLETE
rx.Observable<java.lang.Void> write(rx.Observable<W> msgs)
Observable, writes the passed message stream on the underneath channel.
Observablemsgs - Stream of messages to write.Observable representing the result of this write. Every subscription to this Observable
will replay the write on the channel.rx.Observable<java.lang.Void> write(rx.Observable<W> msgs, rx.functions.Func1<W,java.lang.Boolean> flushSelector)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . Any writes issued before
subscribing, will also be flushed. However, the returned Observable will not capture the result of those
writes, i.e. if the other writes, fail and this write does not, the returned Observable will not fail.msgs - Message stream to write.flushSelector - A Func1 which is invoked for every item emitted from msgs. Channel is
flushed, iff this function returns, true.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, when the
flushSelector returns truerx.Observable<java.lang.Void> writeAndFlushOnEach(rx.Observable<W> msgs)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. Any writes issued before subscribing, will also be flushed. However, the
returned Observable will not capture the result of those writes, i.e. if the other writes, fail and this
write does not, the returned Observable will not fail.msgs - Message stream to write.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, on every
write.rx.Observable<java.lang.Void> writeString(rx.Observable<java.lang.String> msgs)
Observable, writes the passed message stream on the underneath channel.
Observablemsgs - Stream of messages to write.Observable representing the result of this write. Every subscription to this Observable
will replay the write on the channel.rx.Observable<java.lang.Void> writeString(rx.Observable<java.lang.String> msgs,
rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . Any writes issued before
subscribing, will also be flushed. However, the returned Observable will not capture the result of those
writes, i.e. if the other writes, fail and this write does not, the returned Observable will not fail.msgs - Message stream to write.flushSelector - A Func1 which is invoked for every item emitted from msgs. Channel is
flushed, iff this function returns, true.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, when the
flushSelector returns truerx.Observable<java.lang.Void> writeStringAndFlushOnEach(rx.Observable<java.lang.String> msgs)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. Any writes issued before subscribing, will also be flushed. However, the
returned Observable will not capture the result of those writes, i.e. if the other writes, fail and this
write does not, the returned Observable will not fail.msgs - Message stream to write.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, on every
write.rx.Observable<java.lang.Void> writeBytes(rx.Observable<byte[]> msgs)
Observable, writes the passed message stream on the underneath channel.
Observablemsgs - Stream of messages to write.Observable representing the result of this write. Every subscription to this Observable
will replay the write on the channel.rx.Observable<java.lang.Void> writeBytes(rx.Observable<byte[]> msgs,
rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . Any writes issued before
subscribing, will also be flushed. However, the returned Observable will not capture the result of those
writes, i.e. if the other writes, fail and this write does not, the returned Observable will not fail.msgs - Message stream to write.flushSelector - A Func1 which is invoked for every item emitted from msgs. Channel is
flushed, iff this function returns, true.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, when the
flushSelector returns truerx.Observable<java.lang.Void> writeBytesAndFlushOnEach(rx.Observable<byte[]> msgs)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. Any writes issued before subscribing, will also be flushed. However, the
returned Observable will not capture the result of those writes, i.e. if the other writes, fail and this
write does not, the returned Observable will not fail.msgs - Message stream to write.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, on every
write.rx.Observable<java.lang.Void> writeFileRegion(rx.Observable<io.netty.channel.FileRegion> msgs)
Observable, writes the passed message stream on the underneath channel.
Observablemsgs - Stream of messages to write.Observable representing the result of this write. Every subscription to this Observable
will replay the write on the channel.rx.Observable<java.lang.Void> writeFileRegion(rx.Observable<io.netty.channel.FileRegion> msgs,
rx.functions.Func1<io.netty.channel.FileRegion,java.lang.Boolean> flushSelector)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, everytime, flushSelector returns true . Any writes issued before
subscribing, will also be flushed. However, the returned Observable will not capture the result of those
writes, i.e. if the other writes, fail and this write does not, the returned Observable will not fail.msgs - Message stream to write.flushSelector - A Func1 which is invoked for every item emitted from msgs. Channel is
flushed, iff this function returns, true.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, when the
flushSelector returns truerx.Observable<java.lang.Void> writeFileRegionAndFlushOnEach(rx.Observable<io.netty.channel.FileRegion> msgs)
Observable, writes the passed message stream on the underneath channel
and flushes the channel, on every write. Any writes issued before subscribing, will also be flushed. However, the
returned Observable will not capture the result of those writes, i.e. if the other writes, fail and this
write does not, the returned Observable will not fail.msgs - Message stream to write.Observable representing the result of this write. Every
subscription to this Observable will write the passed messages and flush all pending writes, on every
write.<WW> ChannelOperations<WW> transformWrite(AllocatingTransformer<WW,W> transformer)
transformerWW - The target type of the transformer.transformer - Transformer to transform objects written to the channel.ChannelOperations that accepts the transformed type to write.void flush()
Channel.flush(). This can be used for
implementing any custom flusing strategies that otherwise can not be implemented by methods like
write(Observable, Func1).rx.Observable<java.lang.Void> close()
close(true)Observable representing the result of close.rx.Observable<java.lang.Void> close(boolean flush)
Observable representing the result of close and flush.void closeNow()
close() and subscribing to the returned
Observablerx.Observable<java.lang.Void> closeListener()
Observable that completes when this connection is closed.Observable that completes when this connection is closed.