com.sun.enterprise.v3.server
Class HK2Dispatcher
java.lang.Object
com.sun.enterprise.v3.server.HK2Dispatcher
public class HK2Dispatcher
- extends Object
|
Method Summary |
void |
dispatch(org.glassfish.grizzly.http.server.HttpHandler adapter,
ClassLoader cl,
org.glassfish.grizzly.http.server.Request req,
org.glassfish.grizzly.http.server.Response res)
Field threadLocalsField = null;
Field tableField = null;
Field hashCode = null;
Field value;
private void init() {
try {
threadLocalsField = Thread.class.getDeclaredField("threadLocals");
threadLocalsField.setAccessible(true);
Class c = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
tableField = c.getDeclaredField("table");
tableField.setAccessible(true);
hashCode = ThreadLocal.class.getDeclaredField("threadLocalHashCode");
hashCode.setAccessible(true);
c = Class.forName("java.lang.ThreadLocal$ThreadLocalMap$Entry");
value = c.getDeclaredField("value");
value.setAccessible(true);
} catch(NoSuchFieldException e) {
e.printStackTrace();
} catch(ClassNotFoundException e) {
e.printStackTrace();
}
} |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HK2Dispatcher
public HK2Dispatcher()
dispatch
public void dispatch(org.glassfish.grizzly.http.server.HttpHandler adapter,
ClassLoader cl,
org.glassfish.grizzly.http.server.Request req,
org.glassfish.grizzly.http.server.Response res)
- Field threadLocalsField = null;
Field tableField = null;
Field hashCode = null;
Field value;
private void init() {
try {
threadLocalsField = Thread.class.getDeclaredField("threadLocals");
threadLocalsField.setAccessible(true);
Class c = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
tableField = c.getDeclaredField("table");
tableField.setAccessible(true);
hashCode = ThreadLocal.class.getDeclaredField("threadLocalHashCode");
hashCode.setAccessible(true);
c = Class.forName("java.lang.ThreadLocal$ThreadLocalMap$Entry");
value = c.getDeclaredField("value");
value.setAccessible(true);
} catch(NoSuchFieldException e) {
e.printStackTrace();
} catch(ClassNotFoundException e) {
e.printStackTrace();
}
}
Copyright © 2012. All Rights Reserved.