- java.lang.Object
-
- org.redkale.net.Context
-
- 直接已知子类:
HttpContext
,SncpContext
public class Context extends Object
服务器上下文对象详情见: https://redkale.org
- 作者:
- zhangjx
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
Context.ContextConfig
-
字段概要
字段 修饰符和类型 字段 说明 protected int
aliveTimeoutSeconds
protected int
bufferCapacity
protected Charset
charset
protected DispatcherServlet
dispatcher
protected JsonFactory
jsonFactory
protected Logger
logger
protected int
maxBody
protected int
maxConns
protected int
maxHeader
protected String
nodeid
protected ProtobufFactory
protobufFactory
protected int
readTimeoutSeconds
protected ResourceFactory
resourceFactory
protected InetSocketAddress
serverAddress
protected long
serverStartTime
protected SSLBuilder
sslBuilder
protected SSLContext
sslContext
protected ExecutorService
workExecutor
protected int
writeTimeoutSeconds
-
构造器概要
构造器 构造器 说明 Context(long serverStartTime, String nodeid, Logger logger, ExecutorService workExecutor, SSLBuilder sslBuilder, SSLContext sslContext, int bufferCapacity, int maxConns, int maxHeader, int maxBody, Charset charset, InetSocketAddress address, ResourceFactory resourceFactory, DispatcherServlet dispatcher, int aliveTimeoutSeconds, int readTimeoutSeconds, int writeTimeoutSeconds)
Context(Context.ContextConfig config)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
execute(Servlet servlet, Request request, Response response)
protected void
executeDispatch(Request request, Response response)
int
getAliveTimeoutSeconds()
int
getBufferCapacity()
Charset
getCharset()
JsonConvert
getJsonConvert()
Logger
getLogger()
int
getMaxBody()
int
getMaxConns()
int
getMaxHeader()
String
getNodeid()
ProtobufConvert
getProtobufConvert()
int
getReadTimeoutSeconds()
ResourceFactory
getResourceFactory()
InetSocketAddress
getServerAddress()
long
getServerStartTime()
SSLBuilder
getSSLBuilder()
SSLContext
getSSLContext()
int
getWriteTimeoutSeconds()
protected void
updateReadIOThread(AsyncConnection conn, AsyncIOThread ioReadThread)
protected void
updateServerAddress(InetSocketAddress addr)
protected void
updateWriteIOThread(AsyncConnection conn, AsyncIOThread ioWriteThread)
-
-
-
字段详细资料
-
serverStartTime
protected final long serverStartTime
-
nodeid
protected final String nodeid
-
workExecutor
protected final ExecutorService workExecutor
-
sslBuilder
protected final SSLBuilder sslBuilder
-
sslContext
protected final SSLContext sslContext
-
bufferCapacity
protected final int bufferCapacity
-
dispatcher
protected final DispatcherServlet dispatcher
-
logger
protected final Logger logger
-
protobufFactory
protected final ProtobufFactory protobufFactory
-
jsonFactory
protected final JsonFactory jsonFactory
-
resourceFactory
protected final ResourceFactory resourceFactory
-
maxConns
protected int maxConns
-
maxHeader
protected int maxHeader
-
maxBody
protected int maxBody
-
aliveTimeoutSeconds
protected int aliveTimeoutSeconds
-
readTimeoutSeconds
protected int readTimeoutSeconds
-
writeTimeoutSeconds
protected int writeTimeoutSeconds
-
serverAddress
protected InetSocketAddress serverAddress
-
charset
protected Charset charset
-
-
构造器详细资料
-
Context
public Context(Context.ContextConfig config)
-
Context
public Context(long serverStartTime, String nodeid, Logger logger, ExecutorService workExecutor, SSLBuilder sslBuilder, SSLContext sslContext, int bufferCapacity, int maxConns, int maxHeader, int maxBody, Charset charset, InetSocketAddress address, ResourceFactory resourceFactory, DispatcherServlet dispatcher, int aliveTimeoutSeconds, int readTimeoutSeconds, int writeTimeoutSeconds)
-
-
方法详细资料
-
updateReadIOThread
protected void updateReadIOThread(AsyncConnection conn, AsyncIOThread ioReadThread)
-
updateWriteIOThread
protected void updateWriteIOThread(AsyncConnection conn, AsyncIOThread ioWriteThread)
-
updateServerAddress
protected void updateServerAddress(InetSocketAddress addr)
-
getResourceFactory
public ResourceFactory getResourceFactory()
-
getSSLBuilder
public SSLBuilder getSSLBuilder()
-
getSSLContext
public SSLContext getSSLContext()
-
getMaxConns
public int getMaxConns()
-
getMaxHeader
public int getMaxHeader()
-
getMaxBody
public int getMaxBody()
-
getServerAddress
public InetSocketAddress getServerAddress()
-
getServerStartTime
public long getServerStartTime()
-
getNodeid
public String getNodeid()
-
getCharset
public Charset getCharset()
-
getBufferCapacity
public int getBufferCapacity()
-
getLogger
public Logger getLogger()
-
getAliveTimeoutSeconds
public int getAliveTimeoutSeconds()
-
getReadTimeoutSeconds
public int getReadTimeoutSeconds()
-
getWriteTimeoutSeconds
public int getWriteTimeoutSeconds()
-
getJsonConvert
public JsonConvert getJsonConvert()
-
getProtobufConvert
public ProtobufConvert getProtobufConvert()
-
-