public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
SPDYProxyEngine implements a SPDY to SPDY proxy, that is, converts SPDY events received by clients into
SPDY events for the servers.
StreamFrameListener.Adapter| Constructor and Description |
|---|
SPDYProxyEngine(SPDYClient.Factory factory) |
| Modifier and Type | Method and Description |
|---|---|
long |
getConnectTimeout() |
long |
getTimeout() |
void |
onData(Stream clientStream,
DataInfo clientDataInfo)
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.
|
StreamFrameListener |
proxy(Stream clientStream,
SynInfo clientSynInfo,
ProxyEngineSelector.ProxyServerInfo proxyServerInfo) |
void |
setConnectTimeout(long connectTimeout) |
void |
setTimeout(long timeout) |
addRequestProxyHeaders, addResponseProxyHeaders, customizeRequestHeaders, customizeResponseHeaders, getName, removeHopHeaderspublic SPDYProxyEngine(SPDYClient.Factory factory)
public long getConnectTimeout()
public void setConnectTimeout(long connectTimeout)
public long getTimeout()
public void setTimeout(long timeout)
public StreamFrameListener proxy(Stream clientStream, SynInfo clientSynInfo, ProxyEngineSelector.ProxyServerInfo proxyServerInfo)
proxy in class ProxyEnginepublic StreamFrameListener onPush(Stream stream, PushInfo pushInfo)
StreamFrameListenerCallback invoked when a push syn has been received on a stream.
onPush in interface StreamFrameListenerstream - the push stream just createdpushInfo - the push metadatapublic void onReply(Stream stream, ReplyInfo replyInfo)
StreamFrameListenerCallback 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);
}
onReply in interface StreamFrameListenerstream - the streamreplyInfo - the reply metadatapublic void onHeaders(Stream stream, HeadersInfo headersInfo)
StreamFrameListenerCallback invoked when headers are received on a stream.
onHeaders in interface StreamFrameListenerstream - the streamheadersInfo - the headers metadatapublic void onData(Stream clientStream, DataInfo clientDataInfo)
StreamFrameListenerCallback invoked when data bytes are received on a stream.
Implementers should be read or consume the content of the
DataInfo before this method returns.
onData in interface StreamFrameListenerclientStream - the streamclientDataInfo - the data metadatapublic void onFailure(Stream stream, Throwable x)
StreamFrameListenerCallback invoked on errors.
onFailure in interface StreamFrameListenerstream - the streamx - the failureCopyright © 1995-2015 Webtide. All Rights Reserved.