| 
															
																@@ -1,4 +1,4 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-package com.xxl.job.client.netcom.jetty; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+package com.xxl.job.core.executor.jetty; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 import java.util.Map; 
															 | 
															
															 | 
															
																 import java.util.Map; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -14,15 +14,15 @@ import org.springframework.beans.BeansException; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 import org.springframework.context.ApplicationContext; 
															 | 
															
															 | 
															
																 import org.springframework.context.ApplicationContext; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 import org.springframework.context.ApplicationContextAware; 
															 | 
															
															 | 
															
																 import org.springframework.context.ApplicationContextAware; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-import com.xxl.job.client.handler.HandlerRepository; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-import com.xxl.job.client.handler.IJobHandler; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-import com.xxl.job.client.handler.annotation.JobHander; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+import com.xxl.job.core.handler.HandlerRepository; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+import com.xxl.job.core.handler.IJobHandler; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+import com.xxl.job.core.handler.annotation.JobHander; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 /** 
															 | 
															
															 | 
															
																 /** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  * Created by xuxueli on 2016/3/2 21:14. 
															 | 
															
															 | 
															
																  * Created by xuxueli on 2016/3/2 21:14. 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  */ 
															 | 
															
															 | 
															
																  */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-public class XxlJobJettyServer implements ApplicationContextAware { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    private static final Logger logger = LoggerFactory.getLogger(XxlJobJettyServer.class); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+public class XxlJobExecutor implements ApplicationContextAware { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    private static final Logger logger = LoggerFactory.getLogger(XxlJobExecutor.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private int port = 9999; 
															 | 
															
															 | 
															
																     private int port = 9999; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     public void setPort(int port) { 
															 | 
															
															 | 
															
																     public void setPort(int port) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -45,7 +45,7 @@ public class XxlJobJettyServer implements ApplicationContextAware { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 // handler 
															 | 
															
															 | 
															
																                 // handler 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 HandlerCollection handlerc =new HandlerCollection(); 
															 | 
															
															 | 
															
																                 HandlerCollection handlerc =new HandlerCollection(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                handlerc.setHandlers(new Handler[]{new XxlJobJettyServerHandler()}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                handlerc.setHandlers(new Handler[]{new XxlJobExecutorHandler()}); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 server.setHandler(handlerc); 
															 | 
															
															 | 
															
																                 server.setHandler(handlerc); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 try { 
															 | 
															
															 | 
															
																                 try { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -64,7 +64,7 @@ public class XxlJobJettyServer implements ApplicationContextAware { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     public static ApplicationContext applicationContext; 
															 | 
															
															 | 
															
																     public static ApplicationContext applicationContext; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	@Override 
															 | 
															
															 | 
															
																 	@Override 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { 
															 | 
															
															 | 
															
																 	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-		XxlJobJettyServer.applicationContext = applicationContext; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+		XxlJobExecutor.applicationContext = applicationContext; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 		initJobHandler(); 
															 | 
															
															 | 
															
																 		initJobHandler(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	} 
															 | 
															
															 | 
															
																 	} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	 
															 | 
															
															 | 
															
																 	 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -72,7 +72,7 @@ public class XxlJobJettyServer implements ApplicationContextAware { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	 * init job handler service 
															 | 
															
															 | 
															
																 	 * init job handler service 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	 */ 
															 | 
															
															 | 
															
																 	 */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 	public void initJobHandler(){ 
															 | 
															
															 | 
															
																 	public void initJobHandler(){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-		Map<String, Object> serviceBeanMap = XxlJobJettyServer.applicationContext.getBeansWithAnnotation(JobHander.class); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+		Map<String, Object> serviceBeanMap = XxlJobExecutor.applicationContext.getBeansWithAnnotation(JobHander.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         if (serviceBeanMap!=null && serviceBeanMap.size()>0) { 
															 | 
															
															 | 
															
																         if (serviceBeanMap!=null && serviceBeanMap.size()>0) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             for (Object serviceBean : serviceBeanMap.values()) { 
															 | 
															
															 | 
															
																             for (Object serviceBean : serviceBeanMap.values()) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 String jobName = serviceBean.getClass().getAnnotation(JobHander.class).name(); 
															 | 
															
															 | 
															
																                 String jobName = serviceBean.getClass().getAnnotation(JobHander.class).name(); 
															 |