| Method from org.apache.jk.core.JkHandler Detail: |
public void addHandlerCallback(JkHandler w) {
}
Experimental, will be replaced. This allows handlers to be
notified when other handlers are added. |
public MsgContext createMsgContext() {
return new MsgContext(8*1024);
}
|
public MsgContext createMsgContext(int bsize) {
return new MsgContext(bsize);
}
|
public void destroy() throws IOException {
}
Clean up and stop the handler |
public String getDomain() {
return domain;
}
|
public int getId() {
return id;
}
|
public String getName() {
return name;
}
|
public String getNext() {
if( nextName==null ) {
if( next!=null)
nextName=next.getName();
}
return nextName;
}
|
public ObjectName getObjectName() {
return oname;
}
|
public String getProperty(String name) {
return properties.getProperty(name) ;
}
|
public void handleNotification(Notification notification,
Object handback) {
// BaseNotification bNot=(BaseNotification)notification;
// int code=bNot.getCode();
//
// MsgContext ctx=(MsgContext)bNot.getSource();
}
|
public void init() throws IOException {
}
Should register the request types it can handle,
same style as apache2. |
public int invoke(Msg msg,
MsgContext mc) throws IOException {
return OK;
}
|
public void pause() throws Exception {
}
|
public void postDeregister() {
}
|
public void postRegister(Boolean registrationDone) {
}
|
public void preDeregister() throws Exception {
}
|
public ObjectName preRegister(MBeanServer server,
ObjectName oname) throws Exception {
this.oname=oname;
mserver=server;
domain=oname.getDomain();
if( name==null ) {
name=oname.getKeyProperty("name");
}
// we need to create a workerEnv or set one.
ObjectName wEnvName=new ObjectName(domain + ":type=JkWorkerEnv");
if ( wEnv == null ) {
wEnv=new WorkerEnv();
}
if( ! mserver.isRegistered(wEnvName )) {
Registry.getRegistry(null, null).registerComponent(wEnv, wEnvName, null);
}
mserver.invoke( wEnvName, "addHandler",
new Object[] {name, this},
new String[] {"java.lang.String",
"org.apache.jk.core.JkHandler"});
return oname;
}
|
public void resume() throws Exception {
}
|
public void setId(int id) {
this.id=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 ) |
public void setName(String s) {
name=s;
}
Set the name of the handler. Will allways be called by
worker env after creating the worker. |
public void setNext(JkHandler h) {
next=h;
}
Catalina-style "recursive" invocation.
A chain is used for Apache/3.3 style iterative invocation. |
public void setNext(String s) {
nextName=s;
}
|
public void setProperty(String name,
String value) {
properties.put( name, value );
}
|
public void setWorkerEnv(WorkerEnv we) {
this.wEnv=we;
}
|