org.apache.jk.core

Class JkHandler

public class JkHandler extends Object implements MBeanRegistration, NotificationListener

Author: Costin Manolache

Field Summary
protected Stringdomain
static intERROR
static intHANDLE_FLUSH
static intHANDLE_RECEIVE_PACKET
static intHANDLE_SEND_PACKET
static intHANDLE_THREAD_END
protected intid
static intLAST
protected MBeanServermserver
protected Stringname
protected JkHandlernext
protected StringnextName
protected ObjectNameoname
static intOK
protected Propertiesproperties
protected WorkerEnvwEnv
Method Summary
voidaddHandlerCallback(JkHandler w)
Experimental, will be replaced.
MsgContextcreateMsgContext()
MsgContextcreateMsgContext(int bsize)
voiddestroy()
Clean up and stop the handler
StringgetDomain()
intgetId()
StringgetName()
StringgetNext()
ObjectNamegetObjectName()
StringgetProperty(String name)
voidhandleNotification(Notification notification, Object handback)
voidinit()
Should register the request types it can handle, same style as apache2.
intinvoke(Msg msg, MsgContext mc)
voidpause()
voidpostDeregister()
voidpostRegister(Boolean registrationDone)
voidpreDeregister()
ObjectNamepreRegister(MBeanServer server, ObjectName oname)
voidresume()
voidsetId(int id)
Set the id of the worker.
voidsetName(String s)
Set the name of the handler.
voidsetNext(JkHandler h)
Catalina-style "recursive" invocation.
voidsetNext(String s)
voidsetProperty(String name, String value)
voidsetWorkerEnv(WorkerEnv we)

Field Detail

domain

protected String domain

ERROR

public static final int ERROR

HANDLE_FLUSH

public static final int HANDLE_FLUSH

HANDLE_RECEIVE_PACKET

public static final int HANDLE_RECEIVE_PACKET

HANDLE_SEND_PACKET

public static final int HANDLE_SEND_PACKET

HANDLE_THREAD_END

public static final int HANDLE_THREAD_END

id

protected int id

LAST

public static final int LAST

mserver

protected MBeanServer mserver

name

protected String name

protected JkHandler next

nextName

protected String nextName

oname

protected ObjectName oname

OK

public static final int OK

properties

protected Properties properties

wEnv

protected WorkerEnv wEnv

Method Detail

addHandlerCallback

public void addHandlerCallback(JkHandler w)
Experimental, will be replaced. This allows handlers to be notified when other handlers are added.

createMsgContext

public MsgContext createMsgContext()

createMsgContext

public MsgContext createMsgContext(int bsize)

destroy

public void destroy()
Clean up and stop the handler

getDomain

public String getDomain()

getId

public int getId()

getName

public String getName()

getNext

public String getNext()

getObjectName

public ObjectName getObjectName()

getProperty

public String getProperty(String name)

handleNotification

public void handleNotification(Notification notification, Object handback)

init

public void init()
Should register the request types it can handle, same style as apache2.

invoke

public int invoke(Msg msg, MsgContext mc)

pause

public void pause()

postDeregister

public void postDeregister()

postRegister

public void postRegister(Boolean registrationDone)

preDeregister

public void preDeregister()

preRegister

public ObjectName preRegister(MBeanServer server, ObjectName oname)

resume

public void resume()

setId

public void setId(int id)
Set the id of the worker. We use an id for faster dispatch. Since we expect a decent number of handler in system, the id is unique - that means we may have to allocate bigger dispatch tables. ( easy to fix if needed )

setName

public void setName(String s)
Set the name of the handler. Will allways be called by worker env after creating the worker.

setNext

public void setNext(JkHandler h)
Catalina-style "recursive" invocation. A chain is used for Apache/3.3 style iterative invocation.

setNext

public void setNext(String s)

setProperty

public void setProperty(String name, String value)

setWorkerEnv

public void setWorkerEnv(WorkerEnv we)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.