public final class FramingMessageSourceConduit extends AbstractSourceConduit<StreamSourceConduit> implements MessageSourceConduit
next| Constructor and Description |
|---|
FramingMessageSourceConduit(StreamSourceConduit next,
Pooled<ByteBuffer> receiveBuffer)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
awaitReadable()
Block until this channel becomes readable again.
|
void |
awaitReadable(long time,
TimeUnit timeUnit)
Block until this conduit becomes readable again, or until the timeout expires.
|
int |
receive(ByteBuffer dst)
Receive a message.
|
long |
receive(ByteBuffer[] dsts,
int offs,
int len)
Receive a message.
|
void |
resumeReads()
Indicate that the conduit's
ReadReadyHandler should be invoked as soon as data can be read
without blocking. |
void |
terminateReads()
Indicate that no more data will be read from this conduit.
|
getReadThread, isReadResumed, isReadShutdown, setReadReadyHandler, suspendReads, wakeupReadsgetWorkerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReadThread, isReadResumed, isReadShutdown, setReadReadyHandler, suspendReads, wakeupReadspublic FramingMessageSourceConduit(StreamSourceConduit next, Pooled<ByteBuffer> receiveBuffer)
next - the delegate conduit to setreceiveBuffer - the transmit buffer to usepublic void resumeReads()
SourceConduitReadReadyHandler should be invoked as soon as data can be read
without blocking.resumeReads in interface SourceConduitresumeReads in class AbstractSourceConduit<StreamSourceConduit>public void awaitReadable(long time,
TimeUnit timeUnit)
throws IOException
SourceConduitawaitReadable in interface SourceConduitawaitReadable in class AbstractSourceConduit<StreamSourceConduit>time - the time to waittimeUnit - the time unitInterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as wellIOException - if an I/O error occurspublic void awaitReadable()
throws IOException
SourceConduitawaitReadable in interface SourceConduitawaitReadable in class AbstractSourceConduit<StreamSourceConduit>InterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as wellIOException - if an I/O error occurspublic void terminateReads()
throws IOException
SourceConduitterminateReads in interface SourceConduitterminateReads in class AbstractSourceConduit<StreamSourceConduit>IOException - if there was a problempublic int receive(ByteBuffer dst) throws IOException
MessageSourceConduitreceive in interface MessageSourceConduitIOException - if an I/O error occurspublic long receive(ByteBuffer[] dsts, int offs, int len) throws IOException
MessageSourceConduitreceive in interface MessageSourceConduitoffs - the offset into the array of buffers of the first buffer to read intolen - the number of buffers to fillIOException - if an I/O error occursCopyright © 2018 JBoss by Red Hat. All rights reserved.