org.apache.jk.server
Class JkCoyoteHandler

java.lang.Object
  extended byorg.apache.jk.core.JkHandler
      extended byorg.apache.jk.server.JkCoyoteHandler
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationListener, ProtocolHandler

public class JkCoyoteHandler
extends JkHandler
implements ProtocolHandler

Plugs Jk into Coyote. Must be named "type=JkHandler,name=container" jmx:notification-handler name="org.apache.jk.SEND_PACKET jmx:notification-handler name="org.apache.coyote.ACTION_COMMIT


Field Summary
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 destroy()
          Clean up and stop the handler
 Adapter getAdapter()
           
 java.lang.Object getAttribute(java.lang.String name)
          Retrieve config info.
 java.util.Iterator getAttributeNames()
           
 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, 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
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

getAttributeNames

public java.util.Iterator getAttributeNames()
Specified by:
getAttributeNames in interface ProtocolHandler

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

invoke

public int invoke(Msg msg,
                  MsgContext ep)
           throws java.io.IOException
Overrides:
invoke in class JkHandler
Throws:
java.io.IOException

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


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