Apache Tomcat 6.0.53

org.apache.jk.core
Class MsgContext

java.lang.Object
  extended by org.apache.jk.core.MsgContext
All Implemented Interfaces:
ActionHook

public class MsgContext
extends java.lang.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 int JK_STATUS_CLOSED
           
static int JK_STATUS_ERROR
           
static int JK_STATUS_HEAD
           
static int JK_STATUS_NEW
           
static int TIMER_POST_REQUEST
           
static int TIMER_PRE_REQUEST
           
static int TIMER_RECEIVED
           
 
Constructor Summary
MsgContext()
          Deprecated.  
MsgContext(int bsize)
           
 
Method Summary
 void action(ActionCode actionCode, java.lang.Object param)
          Send an action to the connector.
 int execute()
          Invoke a java hook.
 byte[] getBuffer(int id)
          Each context contains a number of byte[] buffers used for communication.
 java.lang.Object getControl()
           
 C2BConverter getConverter()
           
 JkInputStream getInputStream()
           
 long getJniContext()
           
 long getJniEnv()
           
 long getLong(int i)
           
 Msg getMsg(int i)
          The context may store a number of messages ( buffers + marshalling )
 JkHandler getNext()
           
 java.lang.Object getNote(int id)
           
 Request getRequest()
           
 JkChannel getSource()
           
 int getStatus()
           
 int getType()
          The id of the chain
 WorkerEnv getWorkerEnv()
           
 boolean isLogTimeEnabled()
           
 void recycle()
           
 void setControl(java.lang.Object control)
           
 void setConverter(C2BConverter c2b)
           
 void setJniContext(long cContext)
          The long-lived JNI context associated with this java context.
 void setJniEnv(long xEnvP)
          Store native execution context data when this handler is called from JNI.
 void setLong(int i, long l)
           
 void setMsg(int i, Msg msg)
           
 void setNext(JkHandler ch)
           
 void setNote(int id, java.lang.Object o)
           
 void setRequest(Request req)
          The high level request object associated with this context
 void setSource(JkChannel ch)
           
 void setStatus(int s)
           
 void setType(int i)
           
 void setWorkerEnv(WorkerEnv we)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMER_RECEIVED

public static final int TIMER_RECEIVED
See Also:
Constant Field Values

TIMER_PRE_REQUEST

public static final int TIMER_PRE_REQUEST
See Also:
Constant Field Values

TIMER_POST_REQUEST

public static final int TIMER_POST_REQUEST
See Also:
Constant Field Values

JK_STATUS_NEW

public static final int JK_STATUS_NEW
See Also:
Constant Field Values

JK_STATUS_HEAD

public static final int JK_STATUS_HEAD
See Also:
Constant Field Values

JK_STATUS_CLOSED

public static final int JK_STATUS_CLOSED
See Also:
Constant Field Values

JK_STATUS_ERROR

public static final int JK_STATUS_ERROR
See Also:
Constant Field Values
Constructor Detail

MsgContext

public MsgContext(int bsize)

MsgContext

public MsgContext()
Deprecated. 

Method Detail

getNote

public final java.lang.Object getNote(int id)

setNote

public final void setNote(int id,
                          java.lang.Object o)

getType

public final int getType()
The id of the chain


setType

public final void setType(int i)

setLong

public final void setLong(int i,
                          long l)

getLong

public final long getLong(int i)

getWorkerEnv

public final WorkerEnv getWorkerEnv()

setWorkerEnv

public final void setWorkerEnv(WorkerEnv we)

getSource

public final JkChannel getSource()

setSource

public final void setSource(JkChannel ch)

getStatus

public final int getStatus()

setStatus

public final void setStatus(int s)

getNext

public final JkHandler getNext()

setNext

public final void setNext(JkHandler ch)

setRequest

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


getRequest

public final Request getRequest()

getMsg

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


setMsg

public final void setMsg(int i,
                         Msg msg)

getConverter

public final C2BConverter getConverter()

setConverter

public final void setConverter(C2BConverter c2b)

isLogTimeEnabled

public final boolean isLogTimeEnabled()

getInputStream

public JkInputStream getInputStream()

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.


execute

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

Throws:
java.io.IOException

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.


getJniEnv

public long getJniEnv()

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.


getJniContext

public long getJniContext()

getControl

public java.lang.Object getControl()

setControl

public void setControl(java.lang.Object control)

action

public void action(ActionCode actionCode,
                   java.lang.Object param)
Description copied from interface: ActionHook
Send an action to the connector.

Specified by:
action in interface ActionHook
Parameters:
actionCode - Type of the action
param - Action parameter

recycle

public void recycle()

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.