@Configurable public class TcpPort extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
TcpPort.SuspendReaper |
Constructor and Description |
---|
TcpPort() |
Modifier and Type | Method and Description |
---|---|
void |
addContentProgram(ConfigProgram program)
Ignore unknown tags.
|
void |
bind()
Starts the port listening.
|
void |
bind(QServerSocket ss)
Starts the port listening.
|
QServerSocket |
bindForWatchdog()
binds for the watchdog.
|
void |
close()
Shuts the Port down.
|
void |
closeBind()
Shuts the Port down.
|
JsseSSLFactory |
createJsse()
Sets the SSL factory
|
SSLFactory |
createOpenssl()
Sets the SSL factory
|
void |
disable()
Stops the port from listening for new connections.
|
void |
enable()
Starts the port listening for new connections.
|
TcpSocketLink |
findConnectionByThreadId(long threadId)
Find the TcpConnection based on the thread id (for admin)
|
int |
getAcceptListenBacklog()
The operating system listen backlog
|
long |
getAcceptThreadIdleTimeout()
Sets the minimum spare idle timeout.
|
int |
getAcceptThreadMax()
The maximum spare threads.
|
int |
getAcceptThreadMin()
The minimum spare threads.
|
int |
getActiveConnectionCount()
Returns the active connections.
|
int |
getActiveThreadCount()
Returns the active thread count.
|
java.lang.String |
getAddress()
Gets the IP address
|
PortMXBean |
getAdmin() |
long |
getBlockingTimeoutForSelect() |
java.lang.ClassLoader |
getClassLoader() |
int |
getCometIdleCount()
Returns the number of comet connections.
|
int |
getConnectionCount()
Returns the number of connections
|
int |
getConnectionMax()
Gets the connection max.
|
java.lang.String |
getDebugId() |
int |
getDuplexCount()
Returns the number of duplex connections.
|
int |
getIdleThreadCount()
Returns the count of idle threads.
|
int |
getKeepaliveConnectionCount()
Returns the keepalive connections.
|
long |
getKeepaliveConnectionTimeMax()
Gets the keepalive max.
|
int |
getKeepaliveCount()
Returns the number of keepalive connections
|
int |
getKeepaliveMax()
Gets the keepalive max.
|
int |
getKeepaliveSelectMax() |
long |
getKeepaliveSelectThreadTimeout() |
int |
getKeepaliveThreadCount()
Returns the number of keepalive connections
|
long |
getKeepaliveThreadTimeout() |
long |
getKeepaliveTimeout() |
Lifecycle |
getLifecycleState() |
long |
getLifetimeClientDisconnectCount() |
long |
getLifetimeKeepaliveCount() |
long |
getLifetimeKeepaliveSelectCount() |
long |
getLifetimeReadBytes() |
long |
getLifetimeRequestCount() |
long |
getLifetimeRequestTime() |
long |
getLifetimeWriteBytes() |
int |
getLocalPort()
Gets the local port (for ephemeral ports)
|
int |
getPort()
Gets the port.
|
int |
getPortThreadMax() |
Protocol |
getProtocol()
Returns the protocol handler responsible for generating protocol-specific
ProtocolConnections.
|
java.lang.String |
getProtocolName()
Gets the protocol name.
|
long |
getRequestTimeout()
Returns the max time for a request.
|
int |
getSelectConnectionCount()
Returns the number of connections in the select.
|
AbstractSelectManager |
getSelectManager()
returns the select manager.
|
java.lang.String |
getServerSocketClassName()
Returns the server socket class name for debugging.
|
long |
getSocketTimeout()
Gets the read timeout for the accepted sockets.
|
SSLFactory |
getSSL()
Gets the SSL factory.
|
int |
getStartThreadCount()
Returns the count of start threads.
|
long |
getSuspendTimeMax()
Gets the suspend max.
|
int |
getThreadCount()
Returns the thread count.
|
long |
getThrottleConcurrentMax()
Configures the throttle.
|
java.lang.String |
getUrl() |
java.lang.String |
getVirtualHost()
Gets the virtual host for IP-based virtual host.
|
void |
init()
Initializes the port.
|
boolean |
isActive()
Returns true if the port is active.
|
boolean |
isAfterBind() |
boolean |
isAsyncThrottle()
When true, use the async manager to wait for reads rather than
blocking.
|
boolean |
isClosed()
Returns true if the port is closed.
|
boolean |
isEnabled() |
boolean |
isJniEnabled() |
boolean |
isKeepaliveAsyncEnabled() |
boolean |
isSecure()
Return true for secure
|
boolean |
isSSL()
Returns true for ssl.
|
boolean |
isTcpCork()
Gets the tcp-cork property
|
boolean |
isTcpKeepalive() |
boolean |
isTcpNoDelay()
Gets the tcp-no-delay property
|
void |
postBind() |
void |
setAcceptListenBacklog(int listen)
Sets the operating system listen backlog
|
void |
setAcceptThreadIdleTimeout(Period timeout)
Sets the minimum spare idle timeout.
|
void |
setAcceptThreadMax(int maxSpare)
Sets the minimum spare listen.
|
void |
setAcceptThreadMin(int minSpare)
Sets the minimum spare listen.
|
void |
setAddress(java.lang.String address)
Sets the address
|
void |
setConnectionMax(int max)
Sets the connection max.
|
void |
setEnableJni(boolean isEnableJni) |
void |
setHost(java.lang.String address)
Deprecated.
|
void |
setId(java.lang.String id)
Deprecated.
|
void |
setJsseSsl(JsseSSLFactory factory)
Sets the SSL factory
|
void |
setKeepaliveConnectionTimeMax(Period period)
Sets the keepalive max.
|
void |
setKeepaliveConnectionTimeMaxMillis(long timeout) |
void |
setKeepaliveMax(int max)
Sets the keepalive max.
|
void |
setKeepaliveSelectEnable(boolean isKeepaliveSelect) |
void |
setKeepaliveSelectEnabled(boolean isKeepaliveSelect) |
void |
setKeepaliveSelectMax(int max) |
void |
setKeepaliveSelectThreadTimeout(Period period) |
void |
setKeepaliveSelectThreadTimeoutMillis(long timeout) |
void |
setKeepaliveThreadTimeout(Period period) |
void |
setKeepaliveTimeout(Period period) |
void |
setKeepaliveTimeoutMillis(long timeout) |
void |
setPort(int port)
Sets the port.
|
void |
setPortThreadMax(int max) |
void |
setProtocol(Protocol protocol)
Set protocol.
|
void |
setRequestTimeout(Period period) |
void |
setSecure(boolean isSecure)
Sets true for secure
|
void |
setServerSocket(QServerSocket socket)
Sets the server socket.
|
void |
setSocketTimeout(Period period)
Sets the read/write timeout for the accepted sockets.
|
void |
setSocketTimeoutMillis(long timeout)
Sets the read/write timeout for the accepted sockets.
|
void |
setSSL(SSLFactory factory)
Sets the SSL factory
|
void |
setSuspendReaperTimeout(Period period) |
void |
setSuspendTimeMax(Period period) |
void |
setTcpCork(boolean tcpCork)
Sets the tcp-no-delay property
|
void |
setTcpKeepalive(boolean tcpKeepalive)
Sets the tcp-keepalive property
|
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the tcp-no-delay property
|
void |
setThrottleConcurrentMax(int max)
Configures the throttle.
|
void |
setThrottleLimit(int limit)
Sets the throttle limit.
|
void |
setThrottlePeriod(long period)
Sets the throttle period.
|
void |
setThrottleSleepTime(long period)
Sets the throttle sleep time.
|
void |
setVirtualHost(java.lang.String host)
Sets the virtual host for IP-based virtual host.
|
void |
start()
Starts the port listening.
|
java.lang.String |
toString() |
java.lang.String |
toURL() |
@Deprecated public void setId(java.lang.String id)
public java.lang.String getDebugId()
public java.lang.ClassLoader getClassLoader()
public PortMXBean getAdmin()
public void setProtocol(Protocol protocol) throws ConfigException
ConfigException
public Protocol getProtocol()
public java.lang.String getProtocolName()
@Configurable public void setAddress(java.lang.String address) throws java.net.UnknownHostException
java.net.UnknownHostException
public java.lang.String getAddress()
public void setHost(java.lang.String address) throws java.net.UnknownHostException
java.net.UnknownHostException
@Configurable public void setPort(int port)
public int getPort()
public int getLocalPort()
@Configurable public void setVirtualHost(java.lang.String host)
public java.lang.String getVirtualHost()
public void setSSL(SSLFactory factory)
@Configurable public SSLFactory createOpenssl() throws ConfigException
ConfigException
public JsseSSLFactory createJsse()
public void setJsseSsl(JsseSSLFactory factory)
public SSLFactory getSSL()
public boolean isSSL()
@Configurable public void setSecure(boolean isSecure)
public boolean isSecure()
public void setServerSocket(QServerSocket socket)
@Configurable public void setAcceptThreadMin(int minSpare) throws ConfigException
ConfigException
public int getAcceptThreadMin()
@Configurable public void setAcceptThreadMax(int maxSpare) throws ConfigException
ConfigException
public int getAcceptThreadMax()
@Configurable public void setPortThreadMax(int max)
public int getPortThreadMax()
@Configurable public void setAcceptThreadIdleTimeout(Period timeout) throws ConfigException
ConfigException
public long getAcceptThreadIdleTimeout() throws ConfigException
ConfigException
public void setThrottlePeriod(long period)
public void setThrottleLimit(int limit)
public void setThrottleSleepTime(long period)
@Configurable public void setAcceptListenBacklog(int listen) throws ConfigException
ConfigException
public int getAcceptListenBacklog()
@Configurable public void setConnectionMax(int max)
public int getConnectionMax()
@Configurable public void setSocketTimeout(Period period)
public void setSocketTimeoutMillis(long timeout)
public long getSocketTimeout()
public void setRequestTimeout(Period period)
public long getRequestTimeout()
public boolean isTcpNoDelay()
@Configurable public void setTcpNoDelay(boolean tcpNoDelay)
@Configurable public void setTcpKeepalive(boolean tcpKeepalive)
public boolean isTcpKeepalive()
public boolean isTcpCork()
@Configurable public void setTcpCork(boolean tcpCork)
@Configurable public void setThrottleConcurrentMax(int max)
public long getThrottleConcurrentMax()
public void setEnableJni(boolean isEnableJni)
public boolean isJniEnabled()
public void setKeepaliveMax(int max)
public int getKeepaliveMax()
public void setKeepaliveConnectionTimeMax(Period period)
public long getKeepaliveConnectionTimeMax()
public void setKeepaliveConnectionTimeMaxMillis(long timeout)
public long getSuspendTimeMax()
public void setSuspendTimeMax(Period period)
public void setSuspendReaperTimeout(Period period)
public void setKeepaliveTimeout(Period period)
public long getKeepaliveTimeout()
public void setKeepaliveTimeoutMillis(long timeout)
public boolean isKeepaliveAsyncEnabled()
public void setKeepaliveSelectEnabled(boolean isKeepaliveSelect)
public void setKeepaliveSelectEnable(boolean isKeepaliveSelect)
public void setKeepaliveSelectMax(int max)
public long getKeepaliveSelectThreadTimeout()
public long getKeepaliveThreadTimeout()
public void setKeepaliveSelectThreadTimeout(Period period)
public void setKeepaliveThreadTimeout(Period period)
public void setKeepaliveSelectThreadTimeoutMillis(long timeout)
public long getBlockingTimeoutForSelect()
public int getKeepaliveSelectMax()
@Configurable public void addContentProgram(ConfigProgram program)
public int getThreadCount()
public int getActiveThreadCount()
public int getIdleThreadCount()
public int getStartThreadCount()
public int getKeepaliveCount()
public Lifecycle getLifecycleState()
public boolean isAfterBind()
public boolean isActive()
public int getActiveConnectionCount()
public int getKeepaliveConnectionCount()
public int getKeepaliveThreadCount()
public int getSelectConnectionCount()
public java.lang.String getServerSocketClassName()
@PostConstruct public void init() throws ConfigException
ConfigException
public java.lang.String getUrl()
public void bind() throws java.lang.Exception
java.lang.Exception
public void bind(QServerSocket ss) throws java.lang.Exception
java.lang.Exception
public void postBind()
public QServerSocket bindForWatchdog() throws java.io.IOException
java.io.IOException
public void start() throws java.lang.Exception
java.lang.Exception
public boolean isEnabled()
public void enable()
public void disable()
public AbstractSelectManager getSelectManager()
public boolean isAsyncThrottle()
public boolean isClosed()
public int getConnectionCount()
public int getCometIdleCount()
public int getDuplexCount()
public long getLifetimeRequestCount()
public long getLifetimeKeepaliveCount()
public long getLifetimeKeepaliveSelectCount()
public long getLifetimeClientDisconnectCount()
public long getLifetimeRequestTime()
public long getLifetimeReadBytes()
public long getLifetimeWriteBytes()
public TcpSocketLink findConnectionByThreadId(long threadId)
public void closeBind()
public void close()
public java.lang.String toURL()
public java.lang.String toString()
toString
in class java.lang.Object