public abstract class FillInterest extends Object
EndPoint.fillInterested(Callback)
by keeping state and calling the context and callback objects.Modifier | Constructor and Description |
---|---|
protected |
FillInterest() |
Modifier and Type | Method and Description |
---|---|
void |
fillable()
Call to signal that a read is now possible.
|
Invocable.InvocationType |
getCallbackInvocationType() |
boolean |
isInterested() |
protected abstract void |
needsFillInterest()
Register the read interest
Abstract method to be implemented by the Specific ReadInterest to
schedule a future call to
fillable() or onFail(Throwable) |
void |
onClose() |
boolean |
onFail(Throwable cause)
Call to signal a failure to a registered interest
|
void |
register(Callback callback)
Call to register interest in a callback when a read is possible.
|
String |
toStateString() |
String |
toString() |
boolean |
tryRegister(Callback callback)
Call to register interest in a callback when a read is possible.
|
public void register(Callback callback) throws ReadPendingException
needsFillInterest()
returns true or eventually once fillable()
is called.callback
- the callback to registerReadPendingException
- if unable to read due to pending read oppublic boolean tryRegister(Callback callback)
needsFillInterest()
returns true or eventually once fillable()
is called.callback
- the callback to registerpublic void fillable()
public boolean isInterested()
public Invocable.InvocationType getCallbackInvocationType()
public boolean onFail(Throwable cause)
cause
- the cause of the failureCallback
instancepublic void onClose()
public String toStateString()
protected abstract void needsFillInterest() throws IOException
fillable()
or onFail(Throwable)
IOException
- if unable to fulfill interest in fillCopyright © 1995–2017 Webtide. All rights reserved.