- java.lang.Object
-
- org.redkale.net.Context
-
- 直接已知子类:
HttpContext,SncpContext
public class Context extends Object
服务器上下文对象详情见: https://redkale.org
- 作者:
- zhangjx
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classContext.ContextConfig
-
字段概要
字段 修饰符和类型 字段 说明 protected intaliveTimeoutSecondsprotected intbufferCapacityprotected Charsetcharsetprotected DispatcherServletdispatcherprotected JsonFactoryjsonFactoryprotected Loggerloggerprotected intmaxBodyprotected intmaxConnsprotected intmaxHeaderprotected Stringnodeidprotected ProtobufFactoryprotobufFactoryprotected intreadTimeoutSecondsprotected ResourceFactoryresourceFactoryprotected InetSocketAddressserverAddressprotected longserverStartTimeprotected SSLBuildersslBuilderprotected SSLContextsslContextprotected ExecutorServiceworkExecutorprotected intwriteTimeoutSeconds
-
构造器概要
构造器 构造器 说明 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)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidexecute(Servlet servlet, Request request, Response response)protected voidexecuteDispatch(Request request, Response response)intgetAliveTimeoutSeconds()intgetBufferCapacity()CharsetgetCharset()JsonConvertgetJsonConvert()LoggergetLogger()intgetMaxBody()intgetMaxConns()intgetMaxHeader()StringgetNodeid()ProtobufConvertgetProtobufConvert()intgetReadTimeoutSeconds()ResourceFactorygetResourceFactory()InetSocketAddressgetServerAddress()longgetServerStartTime()SSLBuildergetSSLBuilder()SSLContextgetSSLContext()intgetWriteTimeoutSeconds()protected voidupdateReadIOThread(AsyncConnection conn, AsyncIOThread ioReadThread)protected voidupdateServerAddress(InetSocketAddress addr)protected voidupdateWriteIOThread(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()
-
-