public final class SpdyContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SpdyContext.NetSupport |
static interface |
SpdyContext.NonBlockingSpdyHandler
A handler implementing this interface will be called in the 'io' thread - the
thread reading the multiplexed stream, and in the case of non-blocking
transports also handling polling the socket.
|
static interface |
SpdyContext.SpdyHandler |
Modifier and Type | Field and Description |
---|---|
protected boolean |
compression |
static boolean |
debug |
static byte[] |
SPDY_NPN |
static byte[] |
SPDY_NPN_OUT |
protected boolean |
tls |
Constructor and Description |
---|
SpdyContext() |
Modifier and Type | Method and Description |
---|---|
SpdyConnection |
getConnection(String host,
int port)
Client mode: return a connection for host/port.
|
Executor |
getExecutor()
SPDY is a multiplexed protocol - the SpdyProcessors will be executed on
this executor.
|
SpdyFrame |
getFrame()
Get a frame - frames are heavy buffers, may be reused.
|
SpdyContext.SpdyHandler |
getHandler() |
SpdyContext.NetSupport |
getNetSupport() |
SpdyStream |
getStream(SpdyConnection framer)
Override for server side to return a custom stream.
|
void |
listen(int port,
String cert,
String key) |
void |
onStream(SpdyConnection spdyConnection,
SpdyStream ch) |
void |
setExecutor(Executor executor) |
void |
setFrameSize(int frameSize)
Set the max frame size.
|
void |
setHandler(SpdyContext.SpdyHandler handler) |
void |
setNetSupport(SpdyContext.NetSupport netSupport) |
void |
setTlsCompression(boolean tls,
boolean compress) |
void |
stop()
Close all pending connections and free resources.
|
public static final byte[] SPDY_NPN
public static final byte[] SPDY_NPN_OUT
public static final boolean debug
protected boolean tls
protected boolean compression
public void setTlsCompression(boolean tls, boolean compress)
public SpdyFrame getFrame()
public void setFrameSize(int frameSize)
public SpdyStream getStream(SpdyConnection framer)
public void setExecutor(Executor executor)
public void setNetSupport(SpdyContext.NetSupport netSupport)
public SpdyContext.NetSupport getNetSupport()
public Executor getExecutor()
public SpdyContext.SpdyHandler getHandler()
public void setHandler(SpdyContext.SpdyHandler handler)
public SpdyConnection getConnection(String host, int port) throws IOException
IOException
public final void listen(int port, String cert, String key) throws IOException
IOException
public final void stop() throws IOException
IOException
public void onStream(SpdyConnection spdyConnection, SpdyStream ch) throws IOException
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.