|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.port.Port
public class Port
Represents a protocol connection.
| Nested Class Summary | |
|---|---|
class |
Port.SuspendReaper
|
| Constructor Summary | |
|---|---|
Port()
|
|
Port(ClusterServer server)
|
|
| Method Summary | |
|---|---|
boolean |
accept(TcpConnection conn,
boolean isStart)
Accepts a new connection. |
boolean |
allowKeepalive(long acceptStartTime)
Returns true if the keepalive is allowed |
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. |
JsseSSLFactory |
createJsse()
Sets the SSL factory |
SSLFactory |
createOpenssl()
Sets the SSL factory |
void |
environmentBind(EnvironmentClassLoader loader)
Handles the environment bind phase |
void |
environmentConfigure(EnvironmentClassLoader loader)
Handles the environment config phase |
void |
environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init). |
void |
environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping |
int |
getAcceptListenBacklog()
The operating system listen backlog |
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()
|
int |
getCometIdleCount()
Returns the number of comet connections. |
int |
getConnectionCount()
Returns the number of connections |
int |
getConnectionMax()
Gets the connection max. |
int |
getDuplexCount()
Returns the number of duplex connections. |
int |
getFreeKeepalive()
Returns the accept pool. |
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 |
getKeepaliveTimeout()
|
Lifecycle |
getLifecycleState()
|
long |
getLifetimeClientDisconnectCount()
|
long |
getLifetimeKeepaliveCount()
|
long |
getLifetimeReadBytes()
|
long |
getLifetimeRequestCount()
|
long |
getLifetimeRequestTime()
|
long |
getLifetimeWriteBytes()
|
int |
getPort()
Gets the port. |
Protocol |
getProtocol()
Set protocol. |
java.lang.String |
getProtocolName()
Gets the protocol name. |
int |
getSelectConnectionCount()
Returns the number of connections in the select. |
AbstractSelectManager |
getSelectManager()
returns the select manager. |
ProtocolDispatchServer |
getServer()
Gets the server. |
java.lang.String |
getServerId()
Gets the server id. |
long |
getSocketTimeout()
Gets the read timeout for the accepted sockets. |
SSLFactory |
getSSL()
Gets the SSL factory. |
long |
getSuspendTimeMax()
Gets the suspend max. |
boolean |
getTcpNoDelay()
Gets the tcp-no-delay property |
int |
getThreadCount()
Returns the thread count. |
long |
getThrottleConcurrentMax()
Configures the throttle. |
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 |
isClosed()
Returns true if the port is closed. |
boolean |
isIgnoreClientDisconnect()
Returns true for ignore-client-disconnect. |
boolean |
isSecure()
Return true for secure |
boolean |
isSSL()
Returns true for ssl. |
boolean |
matchesServerId(java.lang.String serverId)
Returns true if the port matches the server id. |
void |
postBind()
|
void |
run()
The port thread is responsible for creating new connections. |
void |
setAcceptListenBacklog(int listen)
Sets the operating system listen backlog |
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 |
setClass(java.lang.Class cl)
|
void |
setConnectionMax(int max)
Sets the connection max. |
void |
setHost(java.lang.String address)
Deprecated. |
void |
setId(java.lang.String id)
Sets the id. |
void |
setJsseSsl(JsseSSLFactory factory)
Sets the SSL factory |
void |
setKeepaliveConnectionTimeMax(Period period)
Sets the keepalive max. |
void |
setKeepaliveMax(int max)
Sets the keepalive max. |
void |
setKeepaliveTimeout(Period period)
|
void |
setMaxSpareListen(int maxSpare)
Sets the maximum spare listen. |
void |
setMinSpareListen(int minSpare)
Sets the minimum spare listen. |
void |
setParent(ProtocolDispatchServer parent)
Sets the containing server. |
void |
setPort(int port)
Sets the port. |
void |
setProtocol(Protocol protocol)
Set protocol. |
void |
setReadTimeout(Period period)
Deprecated. |
void |
setSecure(boolean isSecure)
Sets true for secure |
void |
setServer(ProtocolDispatchServer protocolServer)
Sets the server. |
void |
setServerId(java.lang.String id)
Sets the server id. |
void |
setServerSocket(QServerSocket socket)
Sets the server socket. |
void |
setSocketTimeout(Period period)
Sets the read/write timeout for the accepted sockets. |
void |
setSSL(SSLFactory factory)
Sets the SSL factory |
void |
setSuspendTimeMax(Period period)
|
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the tcp-no-delay property |
void |
setThrottleConcurrentMax(int max)
Configures the throttle. |
void |
setType(java.lang.Class cl)
|
void |
setVirtualHost(java.lang.String host)
Sets the virtual host for IP-based virtual host. |
void |
setWriteTimeout(Period period)
Deprecated. |
void |
start()
Starts the port listening. |
java.lang.String |
toString()
|
java.lang.String |
toURL()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Port()
public Port(ClusterServer server)
| Method Detail |
|---|
public void setParent(ProtocolDispatchServer parent)
public void setServer(ProtocolDispatchServer protocolServer)
public ProtocolDispatchServer getServer()
public void setId(java.lang.String id)
public void setServerId(java.lang.String id)
public java.lang.String getServerId()
public void setType(java.lang.Class cl)
public void setClass(java.lang.Class cl)
public PortMXBean getAdmin()
public void setProtocol(Protocol protocol)
throws ConfigException
ConfigExceptionpublic Protocol getProtocol()
public java.lang.String getProtocolName()
public void setAddress(java.lang.String address)
throws java.net.UnknownHostException
java.net.UnknownHostException
public void setHost(java.lang.String address)
throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic java.lang.String getAddress()
public void setPort(int port)
public int getPort()
public void setVirtualHost(java.lang.String host)
public java.lang.String getVirtualHost()
public void setSSL(SSLFactory factory)
public SSLFactory createOpenssl()
throws ConfigException
ConfigExceptionpublic JsseSSLFactory createJsse()
public void setJsseSsl(JsseSSLFactory factory)
public SSLFactory getSSL()
public boolean isSSL()
public void setSecure(boolean isSecure)
public boolean isSecure()
public void setServerSocket(QServerSocket socket)
public void setAcceptThreadMin(int minSpare)
throws ConfigException
ConfigExceptionpublic int getAcceptThreadMin()
public void setAcceptThreadMax(int maxSpare)
throws ConfigException
ConfigExceptionpublic int getAcceptThreadMax()
public void setAcceptListenBacklog(int listen)
throws ConfigException
ConfigExceptionpublic int getAcceptListenBacklog()
public void setConnectionMax(int max)
public int getConnectionMax()
public boolean isIgnoreClientDisconnect()
public void setSocketTimeout(Period period)
public void setReadTimeout(Period period)
public long getSocketTimeout()
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public void setThrottleConcurrentMax(int max)
public long getThrottleConcurrentMax()
public void setWriteTimeout(Period period)
public void setMinSpareListen(int minSpare)
throws ConfigException
ConfigException
public void setMaxSpareListen(int maxSpare)
throws ConfigException
ConfigExceptionpublic int getConnectionCount()
public int getCometIdleCount()
public int getDuplexCount()
public long getLifetimeRequestCount()
public long getLifetimeKeepaliveCount()
public long getLifetimeClientDisconnectCount()
public long getLifetimeRequestTime()
public long getLifetimeReadBytes()
public long getLifetimeWriteBytes()
public void setKeepaliveMax(int max)
public int getKeepaliveMax()
public void setKeepaliveConnectionTimeMax(Period period)
public long getKeepaliveConnectionTimeMax()
public long getSuspendTimeMax()
public void setSuspendTimeMax(Period period)
public void setKeepaliveTimeout(Period period)
public long getKeepaliveTimeout()
public long getKeepaliveSelectThreadTimeout()
public int getKeepaliveSelectMax()
public int getThreadCount()
public int getActiveThreadCount()
public int getIdleThreadCount()
public int getKeepaliveCount()
public Lifecycle getLifecycleState()
public boolean isActive()
public int getActiveConnectionCount()
public int getKeepaliveConnectionCount()
public int getKeepaliveThreadCount()
public int getSelectConnectionCount()
public int getFreeKeepalive()
public boolean matchesServerId(java.lang.String serverId)
public void init()
throws ConfigException
ConfigException
public void bind()
throws java.lang.Exception
java.lang.Exception
public void bind(QServerSocket ss)
throws java.lang.Exception
java.lang.Exceptionpublic void postBind()
public QServerSocket bindForWatchdog()
throws java.io.IOException
java.io.IOException
public void start()
throws java.lang.Exception
java.lang.Exceptionpublic AbstractSelectManager getSelectManager()
public boolean accept(TcpConnection conn,
boolean isStart)
isStart - boolean to mark the first request on the thread for
bookkeeping.public boolean allowKeepalive(long acceptStartTime)
public boolean isClosed()
public void run()
run in interface java.lang.Runnablepublic void environmentConfigure(EnvironmentClassLoader loader)
environmentConfigure in interface EnvironmentListenerpublic void environmentBind(EnvironmentClassLoader loader)
environmentBind in interface EnvironmentListenerpublic void environmentStart(EnvironmentClassLoader loader)
environmentStart in interface EnvironmentListenerpublic void environmentStop(EnvironmentClassLoader loader)
environmentStop in interface EnvironmentListenerpublic void close()
public java.lang.String toURL()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||