public class ServerConfig<T> extends Object
| Constructor and Description |
|---|
ServerConfig() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBacklog() |
BufferFactory |
getBufferFactory() |
String |
getHost() |
NetMonitor |
getMonitor() |
int |
getPort() |
MessageProcessor<T> |
getProcessor() |
Protocol<T> |
getProtocol() |
int |
getReadBufferSize() |
Map<SocketOption<Object>,Object> |
getSocketOptions() |
int |
getThreadNum() |
int |
getWriteBufferCapacity() |
int |
getWriteBufferSize()
获取默认内存块大小
|
void |
setBacklog(int backlog) |
void |
setBufferFactory(BufferFactory bufferFactory) |
void |
setHost(String host) |
void |
setOption(SocketOption socketOption,
Object f) |
void |
setPort(int port) |
void |
setProcessor(MessageProcessor<T> processor) |
void |
setProtocol(Protocol<T> protocol) |
void |
setReadBufferSize(int readBufferSize) |
void |
setThreadNum(int threadNum) |
void |
setWriteBufferCapacity(int writeBufferCapacity) |
void |
setWriteBufferSize(int writeBufferSize) |
String |
toString() |
public int getWriteBufferSize()
public void setWriteBufferSize(int writeBufferSize)
writeBufferSize - 内存块大小public String getHost()
public void setHost(String host)
host - 主机地址public int getPort()
public void setPort(int port)
port - 端口号public NetMonitor getMonitor()
public MessageProcessor<T> getProcessor()
public void setProcessor(MessageProcessor<T> processor)
processor - 消息处理器public int getReadBufferSize()
public void setReadBufferSize(int readBufferSize)
readBufferSize - 读缓冲大小public Map<SocketOption<Object>,Object> getSocketOptions()
public void setOption(SocketOption socketOption, Object f)
socketOption - socketOption名称f - socketOption值public int getWriteBufferCapacity()
public void setWriteBufferCapacity(int writeBufferCapacity)
public int getThreadNum()
public void setThreadNum(int threadNum)
public BufferFactory getBufferFactory()
public void setBufferFactory(BufferFactory bufferFactory)
public int getBacklog()
public void setBacklog(int backlog)
Copyright © 2021. All rights reserved.