xueli.xue před 8 roky
rodič
revize
6b0d17a4c6

+ 3 - 2
xxl-job-core/src/main/java/com/xxl/job/core/glue/loader/GlueLoader.java Zobrazit soubor

8
 
8
 
9
 	/**
9
 	/**
10
 	 * load code source by name, ensure every load is the latest.
10
 	 * load code source by name, ensure every load is the latest.
11
-	 * @param name
12
-	 * @return
11
+	 * @param job_group
12
+	 * @param job_name
13
+	 * @return code source
13
 	 */
14
 	 */
14
 	public String load(String job_group, String job_name);
15
 	public String load(String job_group, String job_name);
15
 	
16
 	

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/handler/IJobHandler.java Zobrazit soubor

12
 	 * job handler <br><br>
12
 	 * job handler <br><br>
13
 	 * the return Object will be and stored
13
 	 * the return Object will be and stored
14
 	 * @param params
14
 	 * @param params
15
-	 * @return 
15
+	 * @return job status
16
 	 * @throws Exception
16
 	 * @throws Exception
17
 	 */
17
 	 */
18
 	public abstract JobHandleStatus execute(String... params) throws Exception;
18
 	public abstract JobHandleStatus execute(String... params) throws Exception;

+ 4 - 4
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java Zobrazit soubor

103
 	 * support read log-file
103
 	 * support read log-file
104
 	 * @param triggerDate
104
 	 * @param triggerDate
105
 	 * @param trigger_log_id
105
 	 * @param trigger_log_id
106
-	 * @return
106
+	 * @return log content
107
 	 */
107
 	 */
108
 	public static String readLog(Date triggerDate, int trigger_log_id ){
108
 	public static String readLog(Date triggerDate, int trigger_log_id ){
109
 		if (triggerDate==null || trigger_log_id<=0) {
109
 		if (triggerDate==null || trigger_log_id<=0) {
137
 	/**
137
 	/**
138
 	 * read log data
138
 	 * read log data
139
 	 * @param logFile
139
 	 * @param logFile
140
-	 * @return
140
+	 * @return log line content
141
 	 */
141
 	 */
142
 	public static String readLines(File logFile){
142
 	public static String readLines(File logFile){
143
 		BufferedReader reader = null;
143
 		BufferedReader reader = null;
167
 	
167
 	
168
 	/**
168
 	/**
169
 	 * read data from line num
169
 	 * read data from line num
170
-	 * @param sourceFile
170
+	 * @param logFile
171
 	 * @param fromLineNum
171
 	 * @param fromLineNum
172
-	 * @return
172
+	 * @return log content
173
 	 * @throws Exception
173
 	 * @throws Exception
174
 	 */
174
 	 */
175
 	public static String readLinesFrom(File logFile, int fromLineNum) {  
175
 	public static String readLinesFrom(File logFile, int fromLineNum) {  

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/router/HandlerRouter.java Zobrazit soubor

64
 		/**
64
 		/**
65
 		 * match Action by enum name
65
 		 * match Action by enum name
66
 		 * @param name
66
 		 * @param name
67
-         * @return
67
+         * @return action
68
          */
68
          */
69
 		public static IAction matchAction(String name){
69
 		public static IAction matchAction(String name){
70
 			if (name!=null && name.trim().length()>0) {
70
 			if (name!=null && name.trim().length()>0) {

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/util/ByteHexConverter.java Zobrazit soubor

51
 	/**
51
 	/**
52
 	 * get length of string
52
 	 * get length of string
53
 	 * @param str
53
 	 * @param str
54
-	 * @return
54
+	 * @return len of string byte
55
 	 */
55
 	 */
56
 	public static int getByteLen(String str){
56
 	public static int getByteLen(String str){
57
 		if (str==null || str.length()==0) {
57
 		if (str==null || str.length()==0) {

+ 4 - 4
xxl-job-core/src/main/java/com/xxl/job/core/util/IpUtil.java Zobrazit soubor

1
 package com.xxl.job.core.util;
1
 package com.xxl.job.core.util;
2
 
2
 
3
+import org.slf4j.Logger;
4
+import org.slf4j.LoggerFactory;
5
+
3
 import java.net.InetAddress;
6
 import java.net.InetAddress;
4
 import java.net.NetworkInterface;
7
 import java.net.NetworkInterface;
5
 import java.net.UnknownHostException;
8
 import java.net.UnknownHostException;
6
 import java.util.Enumeration;
9
 import java.util.Enumeration;
7
 
10
 
8
-import org.slf4j.Logger;
9
-import org.slf4j.LoggerFactory;
10
-
11
 /**
11
 /**
12
  * get ip
12
  * get ip
13
  * @author xuxueli 2016-5-22 11:38:05
13
  * @author xuxueli 2016-5-22 11:38:05
17
 
17
 
18
 	/**
18
 	/**
19
 	 * 获取本机ip
19
 	 * 获取本机ip
20
-	 * @return
20
+	 * @return ip
21
 	 */
21
 	 */
22
 	public static String getIp() {
22
 	public static String getIp() {
23
 		try {
23
 		try {

+ 6 - 6
xxl-job-core/src/main/java/com/xxl/job/core/util/JacksonUtil.java Zobrazit soubor

1
 package com.xxl.job.core.util;
1
 package com.xxl.job.core.util;
2
 
2
 
3
 
3
 
4
-import java.io.IOException;
5
-import java.util.HashMap;
6
-import java.util.Map;
7
-
8
 import org.codehaus.jackson.JsonGenerationException;
4
 import org.codehaus.jackson.JsonGenerationException;
9
 import org.codehaus.jackson.JsonParseException;
5
 import org.codehaus.jackson.JsonParseException;
10
 import org.codehaus.jackson.map.JsonMappingException;
6
 import org.codehaus.jackson.map.JsonMappingException;
11
 import org.codehaus.jackson.map.ObjectMapper;
7
 import org.codehaus.jackson.map.ObjectMapper;
12
 import org.codehaus.jackson.type.TypeReference;
8
 import org.codehaus.jackson.type.TypeReference;
13
 
9
 
10
+import java.io.IOException;
11
+import java.util.HashMap;
12
+import java.util.Map;
13
+
14
 /**
14
 /**
15
  * Jackson util
15
  * Jackson util
16
  * 
16
  * 
29
      * bean、array、List、Map --> json
29
      * bean、array、List、Map --> json
30
      * 
30
      * 
31
      * @param obj
31
      * @param obj
32
-     * @return
32
+     * @return json string
33
      * @throws Exception
33
      * @throws Exception
34
      */
34
      */
35
     public static String writeValueAsString(Object obj) {
35
     public static String writeValueAsString(Object obj) {
50
      * 
50
      * 
51
      * @param jsonStr
51
      * @param jsonStr
52
      * @param clazz
52
      * @param clazz
53
-     * @return
53
+     * @return obj
54
      * @throws Exception
54
      * @throws Exception
55
      */
55
      */
56
     public static <T> T readValue(String jsonStr, Class<T> clazz) {
56
     public static <T> T readValue(String jsonStr, Class<T> clazz) {

+ 3 - 3
xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobNetCommUtil.java Zobrazit soubor

34
     /**
34
     /**
35
      * format object to hex-json
35
      * format object to hex-json
36
      * @param obj
36
      * @param obj
37
-     * @return
37
+     * @return result
38
      */
38
      */
39
     public static String formatObj2HexJson(Object obj){
39
     public static String formatObj2HexJson(Object obj){
40
     	// obj to json
40
     	// obj to json
56
      * parse hex-json to object
56
      * parse hex-json to object
57
      * @param hex
57
      * @param hex
58
      * @param clazz
58
      * @param clazz
59
-     * @return
59
+     * @return result
60
      */
60
      */
61
     public static <T> T parseHexJson2Obj(String hex, Class<T> clazz){
61
     public static <T> T parseHexJson2Obj(String hex, Class<T> clazz){
62
     	// hex to byte[]
62
     	// hex to byte[]
161
 	/**
161
 	/**
162
 	 * parse address ip:port to url http://.../ 
162
 	 * parse address ip:port to url http://.../ 
163
 	 * @param address
163
 	 * @param address
164
-	 * @return
164
+	 * @return result
165
 	 */
165
 	 */
166
 	public static String addressToUrl(String address){
166
 	public static String addressToUrl(String address){
167
 		return "http://" + address + "/";
167
 		return "http://" + address + "/";