From cf545a731c392c6966a3cae6684b373833311dbc Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Sun, 4 Jun 2017 08:03:03 +0800 Subject: [PATCH] --- src/org/redkale/boot/NodeServer.java | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/org/redkale/boot/NodeServer.java b/src/org/redkale/boot/NodeServer.java index 8a8c1d723..cce9f51d9 100644 --- a/src/org/redkale/boot/NodeServer.java +++ b/src/org/redkale/boot/NodeServer.java @@ -94,33 +94,6 @@ public abstract class NodeServer { Thread.currentThread().setContextClassLoader(this.classLoader); } - protected Consumer getExecutor() throws Exception { - if (server == null) return null; - final Field field = Server.class.getDeclaredField("context"); - field.setAccessible(true); - return new Consumer() { - - private Context context; - - @Override - public void accept(Runnable t) { - if (context == null && server != null) { - try { - this.context = (Context) field.get(server); - } catch (Exception e) { - logger.log(Level.SEVERE, "Server (" + server.getSocketAddress() + ") cannot find Context", e); - } - } - if (context == null) { - t.run(); - } else { - context.submitAsync(t); - } - } - - }; - } - public static NodeServer create(Class clazz, Application application, AnyValue serconf) { try { return clazz.getConstructor(Application.class, AnyValue.class).newInstance(application, serconf);