org.apache.jk.common
Class JkMX

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

public class JkMX
extends JkHandler

Load the HTTP or RMI adapters for MX4J and JMXRI. Add "mx.enabled=true" in jk2.properties to enable it. You could also select http and/or jrmp protocol, with mx.httpPort, mx.httpHost, mxjrmpPort and mx.jrmpPort.

If you run into an error message like "SystemId Unknown; Line #12; Column #81; Cannot add attribute name after child nodes or before an element is produced. Attribute will be ignored." after setting mx.enabled to true, you probably need a newer version of Xalan. See the RELEASE-NOTES document section on XML Parsers for more information.


Field Summary
 
Fields inherited from class org.apache.jk.core.JkHandler
domain, ERROR, HANDLE_FLUSH, HANDLE_RECEIVE_PACKET, HANDLE_SEND_PACKET, HANDLE_THREAD_END, id, LAST, name, next, nextName, OK, oname, properties, wEnv
 
Constructor Summary
JkMX()
           
 
Method Summary
 void addHandlerCallback(JkHandler w)
          Experimental, will be replaced.
 void destroy()
          Clean up and stop the handler
 java.lang.String getAuthMode()
           
 java.lang.String getAuthPassword()
           
 java.lang.String getAuthUser()
           
 boolean getEnabled()
           
 java.lang.String getHttpHost()
           
 int getHttpPort()
           
 java.lang.String getJrmpHost()
           
 int getJrmpPort()
           
 boolean getLog4jEnabled()
           
 int getPort()
           
 boolean getUseXSLTProcessor()
           
 void init()
          Should register the request types it can handle, same style as apache2.
 void loadAdapter()
          Initialize the worker.
 void setAuthMode(java.lang.String mode)
           
 void setAuthPassword(java.lang.String password)
           
 void setAuthUser(java.lang.String user)
           
 void setEnabled(boolean b)
          Enable the MX4J adapters (new way)
 void setHttpHost(java.lang.String host)
           
 void setHttpPort(int i)
          Enable the MX4J HTTP internal adapter
 void setJrmpHost(java.lang.String host)
           
 void setJrmpPort(int i)
          Enable the MX4J JRMP internal adapter
 void setLog4jEnabled(boolean b)
          Enable the Log4j MBean)
 void setPort(int i)
          Enable the MX4J adapters (old way, compatible)
 void setUseXSLTProcessor(boolean uxsltp)
           
 
Methods inherited from class org.apache.jk.core.JkHandler
createMsgContext, createMsgContext, getDomain, getId, getName, getNext, getObjectName, getProperty, handleNotification, invoke, pause, postDeregister, postRegister, preDeregister, preRegister, resume, setId, setName, setNext, setNext, setProperty, setWorkerEnv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JkMX

public JkMX()
Method Detail

setEnabled

public void setEnabled(boolean b)
Enable the MX4J adapters (new way)


getEnabled

public boolean getEnabled()

setLog4jEnabled

public void setLog4jEnabled(boolean b)
Enable the Log4j MBean)


getLog4jEnabled

public boolean getLog4jEnabled()

setPort

public void setPort(int i)
Enable the MX4J adapters (old way, compatible)


getPort

public int getPort()

setHttpPort

public void setHttpPort(int i)
Enable the MX4J HTTP internal adapter


getHttpPort

public int getHttpPort()

setHttpHost

public void setHttpHost(java.lang.String host)

getHttpHost

public java.lang.String getHttpHost()

setAuthMode

public void setAuthMode(java.lang.String mode)

getAuthMode

public java.lang.String getAuthMode()

setAuthUser

public void setAuthUser(java.lang.String user)

getAuthUser

public java.lang.String getAuthUser()

setAuthPassword

public void setAuthPassword(java.lang.String password)

getAuthPassword

public java.lang.String getAuthPassword()

setJrmpPort

public void setJrmpPort(int i)
Enable the MX4J JRMP internal adapter


getJrmpPort

public int getJrmpPort()

setJrmpHost

public void setJrmpHost(java.lang.String host)

getJrmpHost

public java.lang.String getJrmpHost()

getUseXSLTProcessor

public boolean getUseXSLTProcessor()

setUseXSLTProcessor

public void setUseXSLTProcessor(boolean uxsltp)

loadAdapter

public void loadAdapter()
                 throws java.io.IOException
Initialize the worker. After this call the worker will be ready to accept new requests.

Throws:
java.io.IOException

destroy

public void destroy()
Description copied from class: JkHandler
Clean up and stop the handler

Overrides:
destroy in class JkHandler

init

public void init()
          throws java.io.IOException
Description copied from class: JkHandler
Should register the request types it can handle, same style as apache2.

Overrides:
init in class JkHandler
Throws:
java.io.IOException

addHandlerCallback

public void addHandlerCallback(JkHandler w)
Description copied from class: JkHandler
Experimental, will be replaced. This allows handlers to be notified when other handlers are added.

Overrides:
addHandlerCallback in class JkHandler


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