public interface StreamFrameListener extends EventListener
A StreamFrameListener
is the passive counterpart of a Stream
and receives
events happening on a SPDY stream.
Stream
Modifier and Type | Interface and Description |
---|---|
static class |
StreamFrameListener.Adapter
Empty implementation of
StreamFrameListener |
Modifier and Type | Method and Description |
---|---|
void |
onData(Stream stream,
DataInfo dataInfo)
Callback invoked when data bytes are received on a stream.
|
void |
onFailure(Stream stream,
Throwable x)
Callback invoked on errors.
|
void |
onHeaders(Stream stream,
HeadersInfo headersInfo)
Callback invoked when headers are received on a stream.
|
StreamFrameListener |
onPush(Stream stream,
PushInfo pushInfo)
Callback invoked when a push syn has been received on a stream.
|
void |
onReply(Stream stream,
ReplyInfo replyInfo)
Callback invoked when a reply to a stream creation has been received.
|
void onReply(Stream stream, ReplyInfo replyInfo)
Callback invoked when a reply to a stream creation has been received.
Application code may implement this method to send more data to the other end:
public void onReply(Stream stream, ReplyInfo replyInfo) { stream.data(new StringDataInfo("content"), true); }
stream
- the streamreplyInfo
- the reply metadatavoid onHeaders(Stream stream, HeadersInfo headersInfo)
Callback invoked when headers are received on a stream.
stream
- the streamheadersInfo
- the headers metadataStreamFrameListener onPush(Stream stream, PushInfo pushInfo)
Callback invoked when a push syn has been received on a stream.
stream
- the push stream just createdpushInfo
- the push metadatavoid onData(Stream stream, DataInfo dataInfo)
Callback invoked when data bytes are received on a stream.
Implementers should be read or consume the content of the
DataInfo
before this method returns.
stream
- the streamdataInfo
- the data metadataCopyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.