|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.servlet.connectionMethods.EnhydraDirector.EnhydraDirectorConnectionMethod
The Enhydra connection method.
Receives and handles requests using the Enhydra Protocol. The protocol is loosely based on the proposed Apache JServ 2.1 protocol, which uses a packet transmission scheme to allow a more rich set of communcation features between web servers and Enhydra. These features include:
Round robin load balancing.
Persistent connections.
Connection Pools.
Callbacks to the front-end web server.
org.enhydra.servlet.connectionMethods.StandardConnectionMethod
Field Summary | |
static java.lang.String |
AUTH_KEY
|
protected java.lang.String |
authKey
The authentication key for this connection. |
protected int |
backlog
The backlog parameter for the server socket. |
static java.lang.String |
BIND_ADDR
|
protected java.lang.String |
bindAddress
IP address to bind to. |
static java.lang.String |
CLIENT_TIMEOUT
|
protected int |
clientTimeout
The maximum time for a thread to keep a socket connection to the client for. |
protected java.lang.String |
cmType
|
protected CircularQueue |
connections
The queue for incoming connections. |
static int |
DEFAULT_CLIENT_TIMEOUT
|
static int |
DEFAULT_NUM_THREADS
|
static int |
DEFAULT_QUEUE_SIZE
|
static int |
DEFAULT_THREAD_TIMEOUT
|
static java.lang.String |
ENHYDRADIRECTOR
|
static java.lang.String |
errorHtml
Return this HTML if an unexpected exception is thrown. |
protected java.lang.ThreadGroup |
handlers
The thread group for EnhydraDirectorHandler threads. |
protected java.net.ServerSocket |
listenerSocket
The server socket. |
protected java.util.Vector |
liveThreads
A list of references to all EnhydraDirectorHandler threads (active and waiting). |
protected int |
maxHandlers
The maximum number of EnhydraDirectorHandler threads. |
protected int |
maxQueue
The maximum size of the connection queue. |
static java.lang.String |
NUM_THREADS
|
protected int |
numWaiting
The total number EnhydraDirectorHandler threads (active and waiting). |
protected int |
port
The port number for this connection method instance to bind to. |
static java.lang.String |
PORT
|
static java.lang.String |
PREFIX_HINT
|
protected java.lang.String |
prefixHint
The URL used on the external (i.e. |
static java.lang.String |
QUEUE_SIZE
|
protected static java.lang.String |
SERVER_BUSY_MSG
|
static java.lang.String |
SESSION_AFFINITY
|
protected boolean |
sessionAffinity
The session affinity flag NOTE: This attribute is not settable through the multiserver administration screen. |
static java.lang.String |
THREAD_TIMEOUT
|
protected int |
threadTimeout
The maximum time for an EnhydraDirectorHandler thread to wait for a connection. |
static java.lang.String |
TYPE
|
Constructor Summary | |
EnhydraDirectorConnectionMethod()
|
|
EnhydraDirectorConnectionMethod(org.apache.coyote.Adapter adapter)
|
Method Summary | |
void |
destroy()
Shut down the connection method. |
boolean |
equivalent(EnhydraDirectorConnectionMethod compareObject)
Compares the port number to determine equivalency |
java.lang.String |
getAuthKey()
Get the authentication key for this connection. |
int |
getBacklog()
|
java.lang.String |
getBindAddress()
Gets the current Bind address, if any. |
int |
getClientTimeout()
Gets the client timeout associated with this connection method. |
protected java.net.Socket |
getConnection()
Returns an socket from the connection queue. |
org.apache.catalina.connector.Connector |
getConnector()
|
java.lang.String |
getDomain()
|
boolean |
getEmptySessionPath()
|
protected EnhydraDirectorConnection |
getEnhydraDirectorConnection()
|
java.lang.String |
getInfo()
Return descriptive information about this Connector implementation. |
int |
getNumThreads()
Gets the maximum number of handler threads associated with this connection method. |
int |
getPort()
Gets the port associated with this connection method. |
java.lang.String |
getPrefixHint()
getPrefixHint() and setPrefixHint(). |
int |
getQueueSize()
Gets the maximum queue size associated with this connection method. |
boolean |
getRebalanceIfSessionExpired()
|
boolean |
getSessionAffinity()
getSessionAffinity() and setSessionAffinity(). |
boolean |
getTcpNoDelay()
|
int |
getThreadTimeout()
Gets the thread timeout associated with this connection method. |
java.lang.String |
getURIEncoding()
|
boolean |
getUseBodyEncodingForURI()
|
void |
run()
Runs the EnhydraDirectorConnectionMethod. |
void |
setAdapter(org.apache.coyote.Adapter adapter)
|
void |
setAuthKey(java.lang.String authKey)
Set the authentication key for this connection. |
void |
setBacklog(int i)
|
void |
setBindAddress(java.lang.String addr)
Sets the current Bind address, if any. |
void |
setClientTimeout(int clientTimeout)
|
void |
setConnector(org.apache.catalina.connector.Connector connector)
|
void |
setDomain(java.lang.String d)
|
void |
setEmptySessionPath(boolean value)
|
void |
setNumThreads(int numThreads)
|
void |
setPort(int port)
|
void |
setPrefixHint(java.lang.String hint)
|
void |
setQueueSize(int queueSize)
|
void |
setRebalanceIfSessionExpired(boolean value)
|
void |
setSessionAffinity(boolean sessionAffinity)
|
void |
setTcpNoDelay(boolean b)
|
void |
setThreadTimeout(int threadTimeout)
|
void |
setURIEncoding(java.lang.String enc)
|
void |
setUseBodyEncodingForURI(boolean use)
|
void |
start()
Begin processing requests via this Connector. |
void |
stop()
Terminate processing requests via this Connector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String errorHtml
response.sendError(HttpServletResponse.SC_SERVER_ERROR,
ConnectionMethod.errorHtml);
protected static final java.lang.String SERVER_BUSY_MSG
public static final java.lang.String ENHYDRADIRECTOR
public static final java.lang.String TYPE
public static final java.lang.String PORT
public static final java.lang.String BIND_ADDR
public static final java.lang.String PREFIX_HINT
public static final java.lang.String SESSION_AFFINITY
public static final java.lang.String AUTH_KEY
public static final java.lang.String NUM_THREADS
public static final java.lang.String QUEUE_SIZE
public static final java.lang.String THREAD_TIMEOUT
public static final java.lang.String CLIENT_TIMEOUT
public static final int DEFAULT_NUM_THREADS
public static final int DEFAULT_QUEUE_SIZE
public static final int DEFAULT_THREAD_TIMEOUT
public static final int DEFAULT_CLIENT_TIMEOUT
protected java.lang.String cmType
protected int port
protected java.lang.String bindAddress
protected java.lang.String prefixHint
protected boolean sessionAffinity
protected java.lang.String authKey
If null
or an empty string, then no authentication is
required.
protected java.net.ServerSocket listenerSocket
protected CircularQueue connections
protected int maxQueue
protected java.lang.ThreadGroup handlers
protected int maxHandlers
protected int threadTimeout
protected int clientTimeout
protected int backlog
protected int numWaiting
protected java.util.Vector liveThreads
Constructor Detail |
public EnhydraDirectorConnectionMethod(org.apache.coyote.Adapter adapter)
public EnhydraDirectorConnectionMethod()
Method Detail |
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean b)
public int getBacklog()
public void setBacklog(int i)
public boolean getUseBodyEncodingForURI()
public void setUseBodyEncodingForURI(boolean use)
public java.lang.String getURIEncoding()
public void setURIEncoding(java.lang.String enc)
public org.apache.catalina.connector.Connector getConnector()
public void setConnector(org.apache.catalina.connector.Connector connector)
public boolean getRebalanceIfSessionExpired()
public void setRebalanceIfSessionExpired(boolean value)
public boolean getEmptySessionPath()
public void setEmptySessionPath(boolean value)
public void run()
run
in interface java.lang.Runnable
protected EnhydraDirectorConnection getEnhydraDirectorConnection()
protected java.net.Socket getConnection()
public boolean equivalent(EnhydraDirectorConnectionMethod compareObject)
compareObject
- The object to compare this to
ConnectionMethodException
- If an error occurs.public void setAdapter(org.apache.coyote.Adapter adapter)
public int getPort()
public void setPort(int port)
public java.lang.String getBindAddress()
public void setBindAddress(java.lang.String addr)
public java.lang.String getPrefixHint()
public void setPrefixHint(java.lang.String hint)
public boolean getSessionAffinity()
public void setSessionAffinity(boolean sessionAffinity)
public java.lang.String getAuthKey()
Returns null
if authentication is not required of clients.
null
if none.public void setAuthKey(java.lang.String authKey)
Set to null
if authentication with clients is not needed.
We don't allow auth key of all whitespace because it is most likely the result of accidental data entry in an otherwise blank 'key' field.
authKey
- The new authtication key, or null
if
authentication is not needed.public int getNumThreads()
public void setNumThreads(int numThreads)
public int getQueueSize()
public void setQueueSize(int queueSize)
public int getClientTimeout()
public void setClientTimeout(int clientTimeout)
public void setDomain(java.lang.String d)
public java.lang.String getDomain()
public int getThreadTimeout()
public void setThreadTimeout(int threadTimeout)
public java.lang.String getInfo()
public void start()
org.apache.catalina.LifecycleException
- if a fatal startup error occurspublic void stop() throws org.apache.catalina.LifecycleException
org.apache.catalina.LifecycleException
- if a fatal shutdown error occurspublic void destroy() throws java.lang.Exception
ConnectionMethodException
- If an error occurs.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |