Stream.ListenerCallback.Completable, Callback.NestedInvocable.InvocationType__nonBlocking| Constructor and Description |
|---|
HTTP2Stream(Scheduler scheduler,
ISession session,
int streamId,
boolean local) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Forcibly closes this stream.
|
void |
data(DataFrame frame,
Callback callback)
Sends the given DATA
frame. |
java.lang.String |
dump() |
void |
dump(java.lang.Appendable out,
java.lang.String indent)
Dump this object (and children) into an Appendable using the provided indent after any new lines.
|
void |
failed(java.lang.Throwable x)
Callback invoked when the operation fails.
|
java.lang.Object |
getAttachment() |
java.lang.Object |
getAttribute(java.lang.String key) |
int |
getId() |
Stream.Listener |
getListener() |
int |
getRecvWindow() |
int |
getSendWindow() |
ISession |
getSession() |
void |
headers(HeadersFrame frame,
Callback callback)
Sends the given HEADERS
frame representing a HTTP response. |
boolean |
isClosed() |
boolean |
isLocal() |
boolean |
isLocallyClosed() |
boolean |
isOpen()
This abstract method should be called to check if idle timeouts
should still be checked.
|
boolean |
isRemotelyClosed() |
boolean |
isReset() |
void |
onClose() |
protected void |
onIdleExpired(java.util.concurrent.TimeoutException timeout)
This abstract method is called when the idle timeout has expired.
|
void |
process(Frame frame,
Callback callback)
Processes the given
frame, belonging to this stream. |
void |
push(PushPromiseFrame frame,
Promise<Stream> promise,
Stream.Listener listener)
Sends the given PUSH_PROMISE
frame. |
java.lang.Object |
removeAttribute(java.lang.String key) |
void |
reset(ResetFrame frame,
Callback callback)
Sends the given RST_STREAM
frame. |
void |
setAttachment(java.lang.Object attachment)
Attaches the given object to this stream for later retrieval.
|
void |
setAttribute(java.lang.String key,
java.lang.Object value) |
void |
setListener(Stream.Listener listener) |
void |
succeeded()
Callback invoked when the operation completes.
|
java.lang.String |
toString() |
boolean |
updateClose(boolean update,
CloseState.Event event)
Updates the close state of this stream.
|
int |
updateRecvWindow(int delta)
Updates the stream receive window by the given
delta. |
int |
updateSendWindow(int delta)
Updates the stream send window by the given
delta. |
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, onOpen, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdleTimeout, setIdleTimeoutgetInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocationdump, dumpObject, dumpObjects, dumpSelfpublic java.lang.Object getAttachment()
getAttachment in interface IStreamIStream.setAttachment(Object)public void setAttachment(java.lang.Object attachment)
IStreamsetAttachment in interface IStreamattachment - the object to attach to this streampublic boolean isLocal()
public ISession getSession()
getSession in interface StreamgetSession in interface IStreampublic void headers(HeadersFrame frame, Callback callback)
StreamSends the given HEADERS frame representing a HTTP response.
public void push(PushPromiseFrame frame, Promise<Stream> promise, Stream.Listener listener)
StreamSends the given PUSH_PROMISE frame.
public void data(DataFrame frame, Callback callback)
StreamSends the given DATA frame.
public void reset(ResetFrame frame, Callback callback)
StreamSends the given RST_STREAM frame.
public java.lang.Object getAttribute(java.lang.String key)
getAttribute in interface Streamkey - the attribute keyStream.setAttribute(String, Object)public void setAttribute(java.lang.String key,
java.lang.Object value)
setAttribute in interface Streamkey - the attribute keyvalue - an arbitrary object to associate with the given key to this streamStream.getAttribute(String),
Stream.removeAttribute(String)public java.lang.Object removeAttribute(java.lang.String key)
removeAttribute in interface Streamkey - the attribute keyStream.setAttribute(String, Object)public boolean isReset()
public boolean isClosed()
public boolean isRemotelyClosed()
isRemotelyClosed in interface IStreamStream.isClosed()public boolean isLocallyClosed()
public boolean isOpen()
IdleTimeoutisOpen in class IdleTimeoutprotected void onIdleExpired(java.util.concurrent.TimeoutException timeout)
IdleTimeoutonIdleExpired in class IdleTimeouttimeout - a TimeoutExceptionpublic Stream.Listener getListener()
getListener in interface IStreamStream.Listener associated with this streamIStream.setListener(Stream.Listener)public void setListener(Stream.Listener listener)
setListener in interface IStreamlistener - the Stream.Listener associated with this streamIStream.getListener()public void process(Frame frame, Callback callback)
IStreamProcesses the given frame, belonging to this stream.
public boolean updateClose(boolean update,
CloseState.Event event)
IStreamUpdates the close state of this stream.
updateClose in interface IStreamupdate - whether to update the close stateevent - the event that caused the close state updatepublic int getSendWindow()
public int getRecvWindow()
public int updateSendWindow(int delta)
IStreamUpdates the stream send window by the given delta.
updateSendWindow in interface IStreamdelta - the delta value (positive or negative) to add to the stream send windowpublic int updateRecvWindow(int delta)
IStreamUpdates the stream receive window by the given delta.
updateRecvWindow in interface IStreamdelta - the delta value (positive or negative) to add to the stream receive windowpublic void close()
IStreamForcibly closes this stream.
public void onClose()
onClose in class IdleTimeoutpublic void succeeded()
CallbackCallback invoked when the operation completes.
succeeded in interface CallbackCallback.failed(Throwable)public void failed(java.lang.Throwable x)
CallbackCallback invoked when the operation fails.
public void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
Dumpablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1995–2021 Webtide. All rights reserved.