|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jk.core.JkHandler org.apache.jk.common.ChannelSocket
Accept ( and send ) TCP messages.
Field Summary | |
protected boolean |
running
|
Fields inherited from class org.apache.jk.core.JkHandler |
domain, ERROR, HANDLE_FLUSH, HANDLE_RECEIVE_PACKET, HANDLE_SEND_PACKET, id, LAST, mserver, name, next, nextName, OK, oname, properties, wEnv |
Constructor Summary | |
ChannelSocket()
|
Method Summary | |
void |
accept(MsgContext ep)
|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
void |
close(MsgContext ep)
|
void |
destroy()
Clean up and stop the handler |
int |
flush(Msg msg,
MsgContext ep)
|
java.lang.String |
getAddress()
|
boolean |
getDaemon()
|
int |
getInstanceId()
At startup we'll look for the first free port in the range. |
int |
getMaxPort()
|
int |
getMaxThreads()
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
int |
getPort()
|
long |
getRequestCount()
|
int |
getServerTimeout()
|
int |
getSoLinger()
|
int |
getSoTimeout()
|
boolean |
getTcpNoDelay()
|
ThreadPool |
getThreadPool()
|
void |
init()
Should register the request types it can handle, same style as apache2. |
int |
invoke(Msg msg,
MsgContext ep)
|
static boolean |
isSameAddress(java.net.InetAddress server,
java.net.InetAddress client)
Return true if the specified client and server addresses
are the same. |
boolean |
isSameAddress(MsgContext ep)
|
void |
open(MsgContext ep)
|
int |
read(MsgContext ep,
byte[] b,
int offset,
int len)
Read N bytes from the InputStream, and ensure we got them all Under heavy load we could experience many fragmented packets just read Unix Network Programming to recall that a call to read didn't ensure you got all the data you want from read() Linux manual On success, the number of bytes read is returned (zero indicates end of file),and the file position is advanced by this number. |
int |
receive(Msg msg,
MsgContext ep)
|
void |
reinit()
Called after you change some fields at runtime using jmx. |
void |
removeNotificationListener(javax.management.NotificationListener listener)
|
void |
resetCounters()
|
int |
send(Msg msg,
MsgContext ep)
|
void |
sendNewMessageNotification(javax.management.Notification notification)
|
void |
setAddress(java.net.InetAddress inet)
|
void |
setAddress(java.lang.String inet)
|
void |
setBacklog(int i)
|
void |
setDaemon(boolean b)
If set to false, the thread pool will be created in non-daemon mode, and will prevent main from exiting |
void |
setMaxPort(int i)
|
void |
setMaxThreads(int i)
|
void |
setNotificationInfo(javax.management.MBeanNotificationInfo[] info)
|
void |
setPort(int port)
Set the port for the ajp13 channel. |
void |
setServerTimeout(int timeout)
Sets the timeout in ms of the server sockets created by this server. |
void |
setSoLinger(int i)
|
void |
setSoTimeout(int i)
|
void |
setTcpNoDelay(boolean b)
|
void |
start()
|
void |
stop()
|
Methods inherited from class org.apache.jk.core.JkHandler |
addHandlerCallback, createMsgContext, getDomain, getId, getName, getNext, getObjectName, getProperty, handleNotification, postDeregister, postRegister, preDeregister, preRegister, setId, setName, setNext, setNext, setProperty, setWorkerEnv |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean running
Constructor Detail |
public ChannelSocket()
Method Detail |
public ThreadPool getThreadPool()
public long getRequestCount()
public void setPort(int port)
public int getPort()
public void setAddress(java.net.InetAddress inet)
public void setAddress(java.lang.String inet)
public java.lang.String getAddress()
public void setServerTimeout(int timeout)
By default this value is 1000ms.
public int getServerTimeout()
public void setTcpNoDelay(boolean b)
public boolean getTcpNoDelay()
public void setSoLinger(int i)
public int getSoLinger()
public void setSoTimeout(int i)
public int getSoTimeout()
public void setMaxPort(int i)
public int getMaxPort()
public int getInstanceId()
public void setDaemon(boolean b)
public boolean getDaemon()
public void setMaxThreads(int i)
public int getMaxThreads()
public void setBacklog(int i)
public void accept(MsgContext ep) throws java.io.IOException
java.io.IOException
public void resetCounters()
public void reinit() throws java.io.IOException
java.io.IOException
public void init() throws java.io.IOException
JkHandler
init
in class JkHandler
java.io.IOException
public void start() throws java.io.IOException
java.io.IOException
public void stop() throws java.io.IOException
java.io.IOException
public void open(MsgContext ep) throws java.io.IOException
java.io.IOException
public void close(MsgContext ep) throws java.io.IOException
java.io.IOException
public void destroy() throws java.io.IOException
JkHandler
destroy
in class JkHandler
java.io.IOException
public int send(Msg msg, MsgContext ep) throws java.io.IOException
java.io.IOException
public int flush(Msg msg, MsgContext ep) throws java.io.IOException
java.io.IOException
public int receive(Msg msg, MsgContext ep) throws java.io.IOException
java.io.IOException
public int read(MsgContext ep, byte[] b, int offset, int len) throws java.io.IOException
java.io.IOException
public int invoke(Msg msg, MsgContext ep) throws java.io.IOException
invoke
in class JkHandler
java.io.IOException
public boolean isSameAddress(MsgContext ep)
public static boolean isSameAddress(java.net.InetAddress server, java.net.InetAddress client)
true
if the specified client and server addresses
are the same. This method works around a bug in the IBM 1.1.8 JVM on
Linux, where the address bytes are returned reversed in some
circumstances.
server
- The server's InetAddressclient
- The client's InetAddresspublic void sendNewMessageNotification(javax.management.Notification notification)
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
addNotificationListener
in interface javax.management.NotificationBroadcaster
java.lang.IllegalArgumentException
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationBroadcaster
javax.management.ListenerNotFoundException
public void setNotificationInfo(javax.management.MBeanNotificationInfo[] info)
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |