org.apache.tomcat.modules.server
Class JNIConnectionHandler
java.lang.Object
org.apache.tomcat.core.BaseInterceptor
org.apache.tomcat.modules.server.JNIConnectionHandler
- All Implemented Interfaces:
- JNIEndpoint.JniHandler
- public class JNIConnectionHandler
- extends BaseInterceptor
- implements JNIEndpoint.JniHandler
Connector for a JNI connections using the API in tomcat.service.
You need to set a "connection.handler" property with the class name of
the JNI connection handler
Based on TcpEndpointConnector
- Author:
- Gal Shachor
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addInterceptor, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNIConnectionHandler
public JNIConnectionHandler()
setNativeLibrary
public void setNativeLibrary(java.lang.String lib)
- Location of the jni library
setExitIfNoLib
public void setExitIfNoLib(boolean b)
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- Called when the ContextManger is started
- Overrides:
engineInit
in class BaseInterceptor
- Throws:
TomcatException
- The module will not be added if any
exception is thrown by engineInit.
engineShutdown
public void engineShutdown(ContextManager cm)
throws TomcatException
- Description copied from class:
BaseInterceptor
- Shut down the module.
- Overrides:
engineShutdown
in class BaseInterceptor
- Throws:
TomcatException
processConnection
public void processConnection(long s,
long l)
- Called from the web server for each request
You can extend JNIConnectionHandler and implement a different
JNIRequest/JNIResponse. Set the new handler on the JNIEndpoint,
the processConnection will be called.
This is temporary, a new, better and cleaner JNI interface
should be added in j-t-c.
- Specified by:
processConnection
in interface JNIEndpoint.JniHandler
shutdown
public void shutdown()
- Specified by:
shutdown
in interface JNIEndpoint.JniHandler
Copyright © 2001 Apache Software Foundation. All Rights Reserved.