| java.lang.Object org.apache.jk.core.JkHandler org.apache.jk.common.JniHandler
All known Subclasses: org.apache.jk.common.Shm, org.apache.jk.common.ChannelJni, org.apache.jk.common.ChannelUn,
JniHandler | public class JniHandler extends JkHandler (Code) | | Base class for components using native code ( libjkjni.so ).
It allows to access the jk_env and wrap ( 'box' ? ) a native
jk component, and call it's methods.
Note that get/setAttribute are expensive ( Strings, etc ),
invoke() is were all optimizations are done. We do recycle
all memory on both C and java sides ( the only exception is
when we attempt pinning but the VM doesn't support it ). The
low level optimizations from ByteBuffer, etc are used to
reduce the overhead of passing strings.
author: Costin Manolache |
JK_HANDLE_JNI_DISPATCH | final public static int JK_HANDLE_JNI_DISPATCH(Code) | | |
JK_HANDLE_SHM_DISPATCH | final public static int JK_HANDLE_SHM_DISPATCH(Code) | | |
MB_NOTE | final public static int MB_NOTE(Code) | | |
MSG_NOTE | final public static int MSG_NOTE(Code) | | |
nativeJkHandlerP | protected long nativeJkHandlerP(Code) | | |
JniHandler | public JniHandler()(Code) | | |
createMsgContext | public MsgContext createMsgContext()(Code) | | Create a msg context to be used with the shm channel
|
init | public void init() throws IOException(Code) | | You must call initNative() inside the component init()
|
initNative | protected void initNative(String nativeComponentName)(Code) | | |
invoke | public int invoke(Msg msg, MsgContext ep) throws IOException(Code) | | Base implementation for invoke. Dispatch the action to the native
code, where invoke() is called on the wrapped jk_bean.
|
nativeDispatch | protected int nativeDispatch(Msg msg, MsgContext ep, int code, int raw) throws IOException(Code) | | send and get the response in the same buffer. This calls the
method on the wrapped jk_bean object.
|
|
|