- java.lang.Object
-
- org.redkale.net.ProtocolServer
-
public abstract class ProtocolServer extends Object
协议底层Server详情见: https://redkale.org
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Application
application
protected Context
context
protected int
maxConns
-
构造器概要
构造器 限定符 构造器 说明 protected
ProtocolServer(Context context)
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 abstract void
accept(Application application, Server server)
abstract void
bind(SocketAddress local, int backlog)
abstract void
close()
static ProtocolServer
create(String protocol, Context context, ClassLoader classLoader)
abstract AsyncGroup
getAsyncGroup()
abstract long
getClosedConnectionCount()
abstract long
getCreateConnectionCount()
abstract long
getLivingConnectionCount()
abstract SocketAddress
getLocalAddress()
abstract void
open(AnyValue config)
abstract <T> void
setOption(SocketOption<T> name, T value)
abstract Set<SocketOption<?>>
supportedOptions()
-
-
-
字段详细资料
-
context
protected final Context context
-
maxConns
protected int maxConns
-
application
protected Application application
-
-
构造器详细资料
-
ProtocolServer
protected ProtocolServer(Context context)
-
-
方法详细资料
-
open
public abstract void open(AnyValue config) throws IOException
- 抛出:
IOException
-
bind
public abstract void bind(SocketAddress local, int backlog) throws IOException
- 抛出:
IOException
-
supportedOptions
public abstract Set<SocketOption<?>> supportedOptions()
-
setOption
public abstract <T> void setOption(SocketOption<T> name, T value) throws IOException
- 抛出:
IOException
-
accept
public abstract void accept(Application application, Server server) throws IOException
- 抛出:
IOException
-
getLocalAddress
public abstract SocketAddress getLocalAddress() throws IOException
- 抛出:
IOException
-
close
public abstract void close() throws IOException
- 抛出:
IOException
-
create
public static ProtocolServer create(String protocol, Context context, ClassLoader classLoader)
-
getAsyncGroup
public abstract AsyncGroup getAsyncGroup()
-
getCreateConnectionCount
public abstract long getCreateConnectionCount()
-
getClosedConnectionCount
public abstract long getClosedConnectionCount()
-
getLivingConnectionCount
public abstract long getLivingConnectionCount()
-
-