JkHandler (Apache Tomcat 6.0.51 API Documentation)
Keywords: org.apache.jk.core.JkHandler class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jk.core
Class JkHandler

    java.lang.Object
      org.apache.jk.core.JkHandler

All Implemented Interfaces:
  java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationListener

Direct Known Subclasses:
  AprImpl, ChannelNioSocket, ChannelShm, ChannelSocket, HandlerDispatch, HandlerRequest, JkCoyoteHandler, JkMX, JniHandler, WorkerDummy

    public class JkHandler

extends java.lang.Object
implements javax.management.MBeanRegistration, javax.management.NotificationListener

Author:
  Costin Manolache

Field Summary
`protected java.lang.String` | `domain`
`static int` | `ERROR`
`static int` | `HANDLE_FLUSH`
`static int` | `HANDLE_RECEIVE_PACKET`
`static int` | `HANDLE_SEND_PACKET`
`static int` | `HANDLE_THREAD_END`
`protected int` | `id`
`static int` | `LAST`
`protected javax.management.MBeanServer` | `mserver`
`protected java.lang.String` | `name`
`protected JkHandler` | `next`
`protected java.lang.String` | `nextName`
`static int` | `OK`
`protected javax.management.ObjectName` | `oname`
`protected java.util.Properties` | `properties`
`protected WorkerEnv` | `wEnv`

Constructor Summary
`JkHandler()`

Method Summary
`void` | `addHandlerCallback(JkHandler w)` Experimental, will be replaced.
`MsgContext` | `createMsgContext()`
`MsgContext` | `createMsgContext(int bsize)`
`void` | `destroy()` Clean up and stop the handler
`java.lang.String` | `getDomain()`
`int` | `getId()`
`java.lang.String` | `getName()`
`java.lang.String` | `getNext()`
`javax.management.ObjectName` | `getObjectName()`
`java.lang.String` | `getProperty(java.lang.String name)`
`void` | `handleNotification(javax.management.Notification notification, java.lang.Object handback)`
`void` | `init()` Should register the request types it can handle, same style as apache2.
`int` | `invoke(Msg msg, MsgContext mc)`
`void` | `pause()`
`void` | `postDeregister()`
`void` | `postRegister(java.lang.Boolean registrationDone)`
`void` | `preDeregister()`
`javax.management.ObjectName` | `preRegister(javax.management.MBeanServer server, javax.management.ObjectName oname)`
`void` | `resume()`
`void` | `setId(int id)` Set the id of the worker.
`void` | `setName(java.lang.String s)` Set the name of the handler.
`void` | `setNext(JkHandler h)` Catalina-style "recursive" invocation.
`void` | `setNext(java.lang.String s)`
`void` | `setProperty(java.lang.String name, java.lang.String value)`
`void` | `setWorkerEnv(WorkerEnv we)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OK

    public static final int OK

See Also:
  Constant Field Values

### LAST

    public static final int LAST

See Also:
  Constant Field Values

### ERROR

    public static final int ERROR

See Also:
  Constant Field Values

### properties

    protected java.util.Properties properties

### wEnv

    protected WorkerEnv wEnv

### next

    protected JkHandler next

### nextName

    protected java.lang.String nextName

### name

    protected java.lang.String name

### id

    protected int id

### HANDLE_RECEIVE_PACKET

    public static final int HANDLE_RECEIVE_PACKET

See Also:
  Constant Field Values

### HANDLE_SEND_PACKET

    public static final int HANDLE_SEND_PACKET

See Also:
  Constant Field Values

### HANDLE_FLUSH

    public static final int HANDLE_FLUSH

See Also:
  Constant Field Values

### HANDLE_THREAD_END

    public static final int HANDLE_THREAD_END

See Also:
  Constant Field Values

### domain

    protected java.lang.String domain

### oname

    protected javax.management.ObjectName oname

### mserver

    protected javax.management.MBeanServer mserver

Constructor Detail

### JkHandler

    public JkHandler()

Method Detail

### setWorkerEnv

    public void setWorkerEnv(WorkerEnv we)

### setName

    public void setName(java.lang.String s)

  Set the name of the handler. Will allways be called by worker env after creating the worker.

### getName

    public java.lang.String getName()

### 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 )

### getId

    public int getId()

### 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(java.lang.String s)

### getNext

    public java.lang.String getNext()

### init

    public void init()
              throws java.io.IOException

  Should register the request types it can handle, same style as apache2.

  Throws:
    `java.io.IOException`

### destroy

    public void destroy()
                 throws java.io.IOException

  Clean up and stop the handler

  Throws:
    `java.io.IOException`

### createMsgContext

    public MsgContext createMsgContext()

### createMsgContext

    public MsgContext createMsgContext(int bsize)

### invoke

    public int invoke(Msg msg,
                      MsgContext mc)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### setProperty

    public void setProperty(java.lang.String name,
                            java.lang.String value)

### getProperty

    public java.lang.String getProperty(java.lang.String name)

### addHandlerCallback

    public void addHandlerCallback(JkHandler w)

  Experimental, will be replaced. This allows handlers to be notified when other handlers are added.

### handleNotification

    public void handleNotification(javax.management.Notification notification,
                                   java.lang.Object handback)

  Specified by:
    `handleNotification` in interface `javax.management.NotificationListener`

### getObjectName

    public javax.management.ObjectName getObjectName()

### getDomain

    public java.lang.String getDomain()

### preRegister

    public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                                   javax.management.ObjectName oname)
                                            throws java.lang.Exception

  Specified by:
    `preRegister` in interface `javax.management.MBeanRegistration`
  Throws:
    `java.lang.Exception`

### postRegister

    public void postRegister(java.lang.Boolean registrationDone)

  Specified by:
    `postRegister` in interface `javax.management.MBeanRegistration`

### preDeregister

    public void preDeregister()
                       throws java.lang.Exception

  Specified by:
    `preDeregister` in interface `javax.management.MBeanRegistration`
  Throws:
    `java.lang.Exception`

### postDeregister

    public void postDeregister()

  Specified by:
    `postDeregister` in interface `javax.management.MBeanRegistration`

### pause

    public void pause()
               throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### resume

    public void resume()
                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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