Top Methods
org.xnio.conduits

public Interface SourceConduit

extends Conduit
Known Direct Subinterfaces
org.xnio.conduits.StreamSourceConduit, org.xnio.conduits.MessageSourceConduit
Known Direct Implementers
org.xnio.conduits.AbstractSourceConduit, org.xnio.conduits.AbstractSynchronizedSourceConduit
Imports
java.io.IOException, .InterruptedIOException, java.util.concurrent.TimeUnit, org.xnio.XnioIoThread

Author
David M. Lloyd

Method Summary

Modifier and TypeMethod and Description
public void
awaitReadable()

Block until this channel becomes readable again.

public void
awaitReadable(long
the time to wait
time
,
TimeUnit
the time unit
timeUnit
)

Block until this conduit becomes readable again, or until the timeout expires.

public XnioIoThread

Returns:

the XNIO read thread
getReadThread
()

Get the XNIO read thread.

public boolean

Returns:

true if read notifications are enabled
isReadResumed
()

Determine whether read notifications are currently enabled.

public boolean

Returns:

true if writes are shut down, false otherwise
isReadShutdown
()

Determine whether reads have been shut down on this conduit.

public void
resumeReads()

Indicate that the conduit's ReadReadyHandler should be invoked as soon as data can be read without blocking.

public void
setReadReadyHandler(ReadReadyHandler
the filter to receive readiness notifications
handler
)

Set the handler which should receive readiness notifications.

public void
suspendReads()

Indicate that calling the conduit's ReadReadyHandler should be suspended.

public void
terminateReads()

Indicate that no more data will be read from this conduit.

public void
wakeupReads()

Indicate that the conduit's ReadReadyHandler should be invoked immediately, and then again as soon as data can be read without blocking.

Inherited from org.xnio.conduits.Conduit:
getWorker

Method Detail

awaitReadableback to summary
public void awaitReadable() throws IOException

Block until this channel becomes readable again. This method may return spuriously before the channel becomes readable.

Exceptions
IOException:
if an I/O error occurs
InterruptedIOException:
if the operation is interrupted; the thread's interrupt flag will be set as well
awaitReadableback to summary
public void awaitReadable(long time, TimeUnit timeUnit) throws IOException

Block until this conduit becomes readable again, or until the timeout expires. This method may return spuriously before the conduit becomes readable or the timeout expires.

Parameters
time:long

the time to wait

timeUnit:TimeUnit

the time unit

Exceptions
IOException:
if an I/O error occurs
InterruptedIOException:
if the operation is interrupted; the thread's interrupt flag will be set as well
getReadThreadback to summary
public XnioIoThread getReadThread()

Get the XNIO read thread.

Returns:XnioIoThread

the XNIO read thread

isReadResumedback to summary
public boolean isReadResumed()

Determine whether read notifications are currently enabled.

Returns:boolean

true if read notifications are enabled

isReadShutdownback to summary
public boolean isReadShutdown()

Determine whether reads have been shut down on this conduit.

Returns:boolean

true if writes are shut down, false otherwise

resumeReadsback to summary
public void resumeReads()

Indicate that the conduit's ReadReadyHandler should be invoked as soon as data can be read without blocking.

setReadReadyHandlerback to summary
public void setReadReadyHandler(ReadReadyHandler handler)

Set the handler which should receive readiness notifications. A filter may pass this invocation on to the filter it wraps, or it may substitute itself.

Parameters
handler:ReadReadyHandler

the filter to receive readiness notifications

suspendReadsback to summary
public void suspendReads()

Indicate that calling the conduit's ReadReadyHandler should be suspended.

terminateReadsback to summary
public void terminateReads() throws IOException

Indicate that no more data will be read from this conduit. If unread data exists, an exception may be thrown.

Exceptions
IOException:
if there was a problem
wakeupReadsback to summary
public void wakeupReads()

Indicate that the conduit's ReadReadyHandler should be invoked immediately, and then again as soon as data can be read without blocking.