Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jk.server
Class JkCoyoteHandler

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

All Implemented Interfaces:
  ActionHook, java.util.EventListener, InputBuffer, javax.management.MBeanRegistration, javax.management.NotificationListener, OutputBuffer, ProtocolHandler

public class JkCoyoteHandler
extends JkHandler
implements ProtocolHandler, ActionHook, OutputBuffer, InputBuffer

Plugs Jk2 into Coyote. Must be named "type=JkHandler,name=container"

Field Summary
`int` | `JK_STATUS_CLOSED`
`int` | `JK_STATUS_HEAD`
`int` | `JK_STATUS_NEW`
`protected JkMain` | `jkMain`
`protected static org.apache.commons.logging.Log` | `log`

Fields inherited from class org.apache.jk.core.JkHandler
`domain, ERROR, HANDLE_FLUSH, HANDLE_RECEIVE_PACKET, HANDLE_SEND_PACKET, HANDLE_THREAD_END, id, LAST, mserver, name, next, nextName, OK, oname, properties, wEnv`

Constructor Summary
`JkCoyoteHandler()`

Method Summary
`void` | `action(ActionCode actionCode, java.lang.Object param)` Send an action to the connector.
`void` | `destroy()` Clean up and stop the handler
`int` | `doRead(ByteChunk chunk, Request req)` Return from the input stream.
`int` | `doWrite(ByteChunk chunk, Response res)`
`Adapter` | `getAdapter()`
`java.lang.Object` | `getAttribute(java.lang.String name)` Retrieve config info.
`JkMain` | `getJkMain()`
`java.lang.String` | `getProperty(java.lang.String name)`
`void` | `init()` Start the protocol
`int` | `invoke(Msg msg, MsgContext ep)`
`void` | `pause()` Pause the protocol (optional).
`javax.management.ObjectName` | `preRegister(javax.management.MBeanServer server, javax.management.ObjectName oname)`
`void` | `resume()` Resume the protocol (optional).
`void` | `setAdapter(Adapter adapter)` The adapter, used to call the connector
`void` | `setAttribute(java.lang.String name, java.lang.Object value)` Pass config info
`void` | `setProperty(java.lang.String name, java.lang.String value)` Set a property.
`void` | `start()` Start the protocol.

Methods inherited from class org.apache.jk.core.JkHandler
`addHandlerCallback, createMsgContext, getDomain, getId, getName, getNext, getObjectName, handleNotification, postDeregister, postRegister, preDeregister, setId, setName, setNext, setNext, setWorkerEnv`

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

Field Detail

### log

    protected static org.apache.commons.logging.Log log

### jkMain

    protected JkMain jkMain

### JK_STATUS_NEW

    public final int JK_STATUS_NEW

See Also:
  Constant Field Values

### JK_STATUS_HEAD

    public final int JK_STATUS_HEAD

See Also:
  Constant Field Values

### JK_STATUS_CLOSED

    public final int JK_STATUS_CLOSED

See Also:
  Constant Field Values

Constructor Detail

### JkCoyoteHandler

    public JkCoyoteHandler()

Method Detail

### setProperty

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

  Set a property. Name is a "component.property". JMX should be used instead.

  Overrides:
    `setProperty` in class `JkHandler`

### getProperty

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

  Overrides:
    `getProperty` in class `JkHandler`

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Pass config info

  Specified by:
    `setAttribute` in interface `ProtocolHandler`

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Retrieve config info. Primarily for use with the admin webapp.

  Specified by:
    `getAttribute` in interface `ProtocolHandler`

### setAdapter

    public void setAdapter(Adapter adapter)

  The adapter, used to call the connector

  Specified by:
    `setAdapter` in interface `ProtocolHandler`

### getAdapter

    public Adapter getAdapter()

  Specified by:
    `getAdapter` in interface `ProtocolHandler`

### getJkMain

    public JkMain getJkMain()

### init

    public void init()

  Start the protocol

  Specified by:
    `init` in interface `ProtocolHandler`
  Overrides:
    `init` in class `JkHandler`

### start

    public void start()

  Description copied from interface: `ProtocolHandler`
  Start the protocol.

  Specified by:
    `start` in interface `ProtocolHandler`

### pause

    public void pause()
               throws java.lang.Exception

  Description copied from interface: `ProtocolHandler`
  Pause the protocol (optional).

  Specified by:
    `pause` in interface `ProtocolHandler`
  Overrides:
    `pause` in class `JkHandler`
  Throws:
    `java.lang.Exception`

### resume

    public void resume()
                throws java.lang.Exception

  Description copied from interface: `ProtocolHandler`
  Resume the protocol (optional).

  Specified by:
    `resume` in interface `ProtocolHandler`
  Overrides:
    `resume` in class `JkHandler`
  Throws:
    `java.lang.Exception`

### destroy

    public void destroy()

  Description copied from class: `JkHandler`
  Clean up and stop the handler

  Specified by:
    `destroy` in interface `ProtocolHandler`
  Overrides:
    `destroy` in class `JkHandler`

### doWrite

    public int doWrite(ByteChunk chunk,
                       Response res)
                throws java.io.IOException

  Specified by:
    `doWrite` in interface `OutputBuffer`
  Throws:
    `java.io.IOException`

### doRead

    public int doRead(ByteChunk chunk,
                      Request req)
               throws java.io.IOException

  Description copied from interface: `InputBuffer`
  Return from the input stream. IMPORTANT: the current model assumes that the protocol will 'own' the buffer and return a pointer to it in ByteChunk ( i.e. the param will have chunk.getBytes()==null before call, and the result after the call ).

  Specified by:
    `doRead` in interface `InputBuffer`
  Throws:
    `java.io.IOException`

### invoke

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

  Overrides:
    `invoke` in class `JkHandler`
  Throws:
    `java.io.IOException`

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

### 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`
  Overrides:
    `preRegister` in class `JkHandler`
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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