public abstract class BufferedInput extends Object implements Input
Modifier and Type | Field and Description |
---|---|
protected CompletionHandler<Integer> |
completionHandler |
protected CompositeBuffer |
compositeBuffer |
protected Condition |
condition |
protected FutureImpl<Integer> |
future |
protected boolean |
isCompletionHandlerRegistered |
protected ReentrantReadWriteLock |
lock |
protected Exception |
registrationStackTrace |
Constructor and Description |
---|
BufferedInput() |
Modifier and Type | Method and Description |
---|---|
boolean |
append(Buffer buffer) |
void |
close() |
Buffer |
getBuffer()
Return the Input's
Buffer . |
boolean |
isBuffered() |
protected void |
notifyCompleted(CompletionHandler<Integer> completionHandler) |
GrizzlyFuture<Integer> |
notifyCondition(Condition condition,
CompletionHandler<Integer> completionHandler) |
protected void |
notifyFailure(CompletionHandler<Integer> completionHandler,
Throwable failure) |
protected abstract void |
onCloseInputSource() |
protected abstract void |
onOpenInputSource() |
boolean |
prepend(Buffer buffer) |
byte |
read() |
int |
size() |
void |
skip(int length) |
Buffer |
takeBuffer()
Takes the Input's
Buffer . |
protected final CompositeBuffer compositeBuffer
protected final ReentrantReadWriteLock lock
protected boolean isCompletionHandlerRegistered
protected Exception registrationStackTrace
protected Condition condition
protected CompletionHandler<Integer> completionHandler
protected FutureImpl<Integer> future
protected abstract void onOpenInputSource() throws IOException
IOException
protected abstract void onCloseInputSource() throws IOException
IOException
public boolean append(Buffer buffer)
public boolean prepend(Buffer buffer)
public byte read() throws IOException
read
in interface Input
IOException
public final boolean isBuffered()
isBuffered
in interface Input
public Buffer getBuffer()
Input
Buffer
.public Buffer takeBuffer()
Input
takeBuffer
in interface Input
Buffer
. This Input should
never try to access this Buffer
.public GrizzlyFuture<Integer> notifyCondition(Condition condition, CompletionHandler<Integer> completionHandler)
notifyCondition
in interface Input
protected void notifyCompleted(CompletionHandler<Integer> completionHandler)
protected void notifyFailure(CompletionHandler<Integer> completionHandler, Throwable failure)
Copyright © 2014 Oracle Corporation. All rights reserved.