Package org.eclipse.jetty.io
Class FillInterest
java.lang.Object
org.eclipse.jetty.io.FillInterest
A Utility class to help implement
EndPoint.fillInterested(Callback)
by keeping state and calling the context and callback objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfillable()Call to signal that a read is now possible.booleanprotected abstract voidRegister the read interest Abstract method to be implemented by the Specific ReadInterest to schedule a future call tofillable()oronFail(Throwable)voidonClose()booleanCall to signal a failure to a registered interestvoidCall to register interest in a callback when a read is possible.toString()booleantryRegister(Callback callback) Call to register interest in a callback when a read is possible.
-
Constructor Details
-
FillInterest
protected FillInterest()
-
-
Method Details
-
register
Call to register interest in a callback when a read is possible. The callback will be called either immediately ifneedsFillInterest()returns true or eventually oncefillable()is called.- Parameters:
callback- the callback to register- Throws:
ReadPendingException- if unable to read due to pending read op
-
tryRegister
Call to register interest in a callback when a read is possible. The callback will be called either immediately ifneedsFillInterest()returns true or eventually oncefillable()is called.- Parameters:
callback- the callback to register- Returns:
- true if the register succeeded
-
fillable
public boolean fillable()Call to signal that a read is now possible.- Returns:
- whether the callback was notified that a read is now possible
-
isInterested
public boolean isInterested()- Returns:
- True if a read callback has been registered
-
getCallbackInvocationType
-
onFail
Call to signal a failure to a registered interest- Parameters:
cause- the cause of the failure- Returns:
- true if the cause was passed to a
Callbackinstance
-
onClose
public void onClose() -
toString
-
toStateString
-
needsFillInterest
Register the read interest Abstract method to be implemented by the Specific ReadInterest to schedule a future call tofillable()oronFail(Throwable)- Throws:
IOException- if unable to fulfill interest in fill
-