org.apache.jk.core

Class MsgContext

public class MsgContext extends Object implements ActionHook

Author: Henri Gomez [hgomez@apache.org] Dan Milstein [danmil@shore.net] Keith Wannamaker [Keith@Wannamaker.org] Kevin Seguin Costin Manolache

Field Summary
static intJK_STATUS_CLOSED
static intJK_STATUS_ERROR
static intJK_STATUS_HEAD
static intJK_STATUS_NEW
static intTIMER_POST_REQUEST
static intTIMER_PRE_REQUEST
static intTIMER_RECEIVED
Constructor Summary
MsgContext(int bsize)
MsgContext()
Method Summary
voidaction(ActionCode actionCode, Object param)
intexecute()
Invoke a java hook.
byte[]getBuffer(int id)
Each context contains a number of byte[] buffers used for communication.
ObjectgetControl()
C2BConvertergetConverter()
JkInputStreamgetInputStream()
longgetJniContext()
longgetJniEnv()
longgetLong(int i)
MsggetMsg(int i)
The context may store a number of messages ( buffers + marshalling )
JkHandlergetNext()
ObjectgetNote(int id)
RequestgetRequest()
JkChannelgetSource()
intgetStatus()
intgetType()
The id of the chain
WorkerEnvgetWorkerEnv()
booleanisLogTimeEnabled()
voidrecycle()
voidsetControl(Object control)
voidsetConverter(C2BConverter c2b)
voidsetJniContext(long cContext)
The long-lived JNI context associated with this java context.
voidsetJniEnv(long xEnvP)
Store native execution context data when this handler is called from JNI.
voidsetLong(int i, long l)
voidsetMsg(int i, Msg msg)
voidsetNext(JkHandler ch)
voidsetNote(int id, Object o)
voidsetRequest(Request req)
The high level request object associated with this context
voidsetSource(JkChannel ch)
voidsetStatus(int s)
voidsetType(int i)
voidsetWorkerEnv(WorkerEnv we)

Field Detail

JK_STATUS_CLOSED

public static final int JK_STATUS_CLOSED

JK_STATUS_ERROR

public static final int JK_STATUS_ERROR

JK_STATUS_HEAD

public static final int JK_STATUS_HEAD

JK_STATUS_NEW

public static final int JK_STATUS_NEW

TIMER_POST_REQUEST

public static final int TIMER_POST_REQUEST

TIMER_PRE_REQUEST

public static final int TIMER_PRE_REQUEST

TIMER_RECEIVED

public static final int TIMER_RECEIVED

Constructor Detail

MsgContext

public MsgContext(int bsize)

MsgContext

public MsgContext()

Deprecated:

Method Detail

action

public void action(ActionCode actionCode, Object param)

execute

public int execute()
Invoke a java hook. The xEnv is the representation of the current execution environment ( the jni_env_t * )

getBuffer

public byte[] getBuffer(int id)
Each context contains a number of byte[] buffers used for communication. The C side will contain a char * equivalent - both buffers are long-lived and recycled. This will be called at init time. A long-lived global reference to the byte[] will be stored in the C context.

getControl

public Object getControl()

getConverter

public final C2BConverter getConverter()

getInputStream

public JkInputStream getInputStream()

getJniContext

public long getJniContext()

getJniEnv

public long getJniEnv()

getLong

public final long getLong(int i)

getMsg

public final Msg getMsg(int i)
The context may store a number of messages ( buffers + marshalling )

getNext

public final JkHandler getNext()

getNote

public final Object getNote(int id)

getRequest

public final Request getRequest()

getSource

public final JkChannel getSource()

getStatus

public final int getStatus()

getType

public final int getType()
The id of the chain

getWorkerEnv

public final WorkerEnv getWorkerEnv()

isLogTimeEnabled

public final boolean isLogTimeEnabled()

recycle

public void recycle()

setControl

public void setControl(Object control)

setConverter

public final void setConverter(C2BConverter c2b)

setJniContext

public void setJniContext(long cContext)
The long-lived JNI context associated with this java context. The 2 share pointers to buffers and cache data to avoid expensive jni calls.

setJniEnv

public void setJniEnv(long xEnvP)
Store native execution context data when this handler is called from JNI. This will change on each call, represent temproary call data.

setLong

public final void setLong(int i, long l)

setMsg

public final void setMsg(int i, Msg msg)

setNext

public final void setNext(JkHandler ch)

setNote

public final void setNote(int id, Object o)

setRequest

public final void setRequest(Request req)
The high level request object associated with this context

setSource

public final void setSource(JkChannel ch)

setStatus

public final void setStatus(int s)

setType

public final void setType(int i)

setWorkerEnv

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