Save This Page
Home » apache-tomcat-6.0.26-src » org.apache.jk » server » [javadoc | source]
public class: JkMain [javadoc | source]

All Implemented Interfaces:

Main class used to startup and configure jk. It manages the conf/ file and is the target of JMX proxy. It implements a policy of save-on-change - whenever a property is changed at runtime the file will be overriden. You can edit the config file when tomcat is stoped ( or if you don't use JMX or other admin tools ). The format of
Set a property on the associated component. TYPE will be used to find the class name and instantiate the component. LOCALNAME allows multiple instances. In JMX mode, TYPE and LOCALNAME will form the JMX name ( eventually combined with a 'jk2' component )
Define global properties to be used in ${} substitutions
Adds a new 'type' of component. We predefine all known types.
Instances are created the first time a component name is found. In addition, 'handler.list' property will override the list of 'default' components that are loaded automatically. Note that the properties file is just one (simplistic) way to configure jk. We hope to see configs based on registry, LDAP, db, etc. ( XML is not necesarily better )
Field Summary
 WorkerEnv wEnv     
 String propFile     
 Properties props     
 Properties modules     
 boolean modified     
 boolean started     
 boolean saveProperties     
 String out     
 String err     
 File propsF     
static  String[] defaultHandlers     
 long initTime     
 long startTime     
static  JkMain jkMain     
static  Hashtable replacements     
static  Log log     
protected  String domain     
protected  ObjectName oname     
protected  MBeanServer mserver     
 public JkMain() 
Method from org.apache.jk.server.JkMain Summary:
getChannelClassName,   getDomain,   getErr,   getInitTime,   getJkHome,   getJkMain,   getObjectName,   getOut,   getPropertiesFile,   getProperty,   getStartTime,   getWorkerClassName,   getWorkerEnv,   init,   main,   pause,   postDeregister,   postRegister,   preDeregister,   preRegister,   resume,   saveProperties,   setBeanProperty,   setChannelClassName,   setErr,   setJkHome,   setOut,   setPropertiesFile,   setProperty,   setPropertyString,   setSaveProperties,   setWorkerClassName,   setWorkerEnv,   start,   stop
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jk.server.JkMain Detail:
 public String getChannelClassName() 
 public String getDomain() 
 public String getErr() 
 public long getInitTime() 
    The time it took to initialize jk ( ms)
 public String getJkHome() 
 public static JkMain getJkMain() 
 public ObjectName getObjectName() 
 public String getOut() 
 public String getPropertiesFile() 
 public Object getProperty(String name) 
    Retrieve a property.
 public long getStartTime() 
    The time it took to start jk ( ms )
 public String getWorkerClassName() 
 public WorkerEnv getWorkerEnv() 
 public  void init() throws IOException 
 public static  void main(String[] args) 
 public  void pause() throws Exception 
 public  void postDeregister() 
 public  void postRegister(Boolean registrationDone) 
 public  void preDeregister() throws Exception 
 public ObjectName preRegister(MBeanServer server,
    ObjectName name) throws Exception 
 public  void resume() throws Exception 
 public  void saveProperties() 
 public  void setBeanProperty(Object target,
    String name,
    String val) 
 public  void setChannelClassName(String name) 
    Set the channelClassName that will used to connect to httpd.
 public  void setErr(String s) 
 public  void setJkHome(String s) 
    Set the base dir of jk2. ( including WEB-INF if in a webapp ). We'll try to guess it from classpath if none is set ( for example on command line ), but if in a servlet environment you need to use Context.getRealPath or a system property or set it expliciltey.
 public  void setOut(String s) 
 public  void setPropertiesFile(String p) 
    Load a .properties file into and set the values into jk2 configuration.
 public  void setProperty(String n,
    String v) 
    Set a name/value as a jk2 property
 public  void setPropertyString(String handlerN,
    String name,
    String val) 
 public  void setSaveProperties(boolean b) 
 public  void setWorkerClassName(String name) 
    Set the workerClassName that will handle the request. ( sort of 'pivot' in axis :-)
 public  void setWorkerEnv(WorkerEnv wEnv) 
 public  void start() throws IOException 
 public  void stop()