Java Doc更新
This commit is contained in:
parent
4fa579b225
commit
6b0d17a4c6
|
@ -8,8 +8,9 @@ public interface GlueLoader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* load code source by name, ensure every load is the latest.
|
* load code source by name, ensure every load is the latest.
|
||||||
* @param name
|
* @param job_group
|
||||||
* @return
|
* @param job_name
|
||||||
|
* @return code source
|
||||||
*/
|
*/
|
||||||
public String load(String job_group, String job_name);
|
public String load(String job_group, String job_name);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ public abstract class IJobHandler extends HandlerRouter {
|
||||||
* job handler <br><br>
|
* job handler <br><br>
|
||||||
* the return Object will be and stored
|
* the return Object will be and stored
|
||||||
* @param params
|
* @param params
|
||||||
* @return
|
* @return job status
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public abstract JobHandleStatus execute(String... params) throws Exception;
|
public abstract JobHandleStatus execute(String... params) throws Exception;
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class XxlJobFileAppender extends AppenderSkeleton {
|
||||||
* support read log-file
|
* support read log-file
|
||||||
* @param triggerDate
|
* @param triggerDate
|
||||||
* @param trigger_log_id
|
* @param trigger_log_id
|
||||||
* @return
|
* @return log content
|
||||||
*/
|
*/
|
||||||
public static String readLog(Date triggerDate, int trigger_log_id ){
|
public static String readLog(Date triggerDate, int trigger_log_id ){
|
||||||
if (triggerDate==null || trigger_log_id<=0) {
|
if (triggerDate==null || trigger_log_id<=0) {
|
||||||
|
@ -137,7 +137,7 @@ public class XxlJobFileAppender extends AppenderSkeleton {
|
||||||
/**
|
/**
|
||||||
* read log data
|
* read log data
|
||||||
* @param logFile
|
* @param logFile
|
||||||
* @return
|
* @return log line content
|
||||||
*/
|
*/
|
||||||
public static String readLines(File logFile){
|
public static String readLines(File logFile){
|
||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
|
@ -167,9 +167,9 @@ public class XxlJobFileAppender extends AppenderSkeleton {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* read data from line num
|
* read data from line num
|
||||||
* @param sourceFile
|
* @param logFile
|
||||||
* @param fromLineNum
|
* @param fromLineNum
|
||||||
* @return
|
* @return log content
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static String readLinesFrom(File logFile, int fromLineNum) {
|
public static String readLinesFrom(File logFile, int fromLineNum) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class HandlerRouter {
|
||||||
/**
|
/**
|
||||||
* match Action by enum name
|
* match Action by enum name
|
||||||
* @param name
|
* @param name
|
||||||
* @return
|
* @return action
|
||||||
*/
|
*/
|
||||||
public static IAction matchAction(String name){
|
public static IAction matchAction(String name){
|
||||||
if (name!=null && name.trim().length()>0) {
|
if (name!=null && name.trim().length()>0) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class ByteHexConverter {
|
||||||
/**
|
/**
|
||||||
* get length of string
|
* get length of string
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return len of string byte
|
||||||
*/
|
*/
|
||||||
public static int getByteLen(String str){
|
public static int getByteLen(String str){
|
||||||
if (str==null || str.length()==0) {
|
if (str==null || str.length()==0) {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.xxl.job.core.util;
|
package com.xxl.job.core.util;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get ip
|
* get ip
|
||||||
* @author xuxueli 2016-5-22 11:38:05
|
* @author xuxueli 2016-5-22 11:38:05
|
||||||
|
@ -17,7 +17,7 @@ public class IpUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取本机ip
|
* 获取本机ip
|
||||||
* @return
|
* @return ip
|
||||||
*/
|
*/
|
||||||
public static String getIp() {
|
public static String getIp() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package com.xxl.job.core.util;
|
package com.xxl.job.core.util;
|
||||||
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.codehaus.jackson.JsonGenerationException;
|
import org.codehaus.jackson.JsonGenerationException;
|
||||||
import org.codehaus.jackson.JsonParseException;
|
import org.codehaus.jackson.JsonParseException;
|
||||||
import org.codehaus.jackson.map.JsonMappingException;
|
import org.codehaus.jackson.map.JsonMappingException;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import org.codehaus.jackson.map.ObjectMapper;
|
||||||
import org.codehaus.jackson.type.TypeReference;
|
import org.codehaus.jackson.type.TypeReference;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Jackson util
|
* Jackson util
|
||||||
*
|
*
|
||||||
|
@ -29,7 +29,7 @@ public class JacksonUtil {
|
||||||
* bean、array、List、Map --> json
|
* bean、array、List、Map --> json
|
||||||
*
|
*
|
||||||
* @param obj
|
* @param obj
|
||||||
* @return
|
* @return json string
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static String writeValueAsString(Object obj) {
|
public static String writeValueAsString(Object obj) {
|
||||||
|
@ -50,7 +50,7 @@ public class JacksonUtil {
|
||||||
*
|
*
|
||||||
* @param jsonStr
|
* @param jsonStr
|
||||||
* @param clazz
|
* @param clazz
|
||||||
* @return
|
* @return obj
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static <T> T readValue(String jsonStr, Class<T> clazz) {
|
public static <T> T readValue(String jsonStr, Class<T> clazz) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class XxlJobNetCommUtil {
|
||||||
/**
|
/**
|
||||||
* format object to hex-json
|
* format object to hex-json
|
||||||
* @param obj
|
* @param obj
|
||||||
* @return
|
* @return result
|
||||||
*/
|
*/
|
||||||
public static String formatObj2HexJson(Object obj){
|
public static String formatObj2HexJson(Object obj){
|
||||||
// obj to json
|
// obj to json
|
||||||
|
@ -56,7 +56,7 @@ public class XxlJobNetCommUtil {
|
||||||
* parse hex-json to object
|
* parse hex-json to object
|
||||||
* @param hex
|
* @param hex
|
||||||
* @param clazz
|
* @param clazz
|
||||||
* @return
|
* @return result
|
||||||
*/
|
*/
|
||||||
public static <T> T parseHexJson2Obj(String hex, Class<T> clazz){
|
public static <T> T parseHexJson2Obj(String hex, Class<T> clazz){
|
||||||
// hex to byte[]
|
// hex to byte[]
|
||||||
|
@ -161,7 +161,7 @@ public class XxlJobNetCommUtil {
|
||||||
/**
|
/**
|
||||||
* parse address ip:port to url http://.../
|
* parse address ip:port to url http://.../
|
||||||
* @param address
|
* @param address
|
||||||
* @return
|
* @return result
|
||||||
*/
|
*/
|
||||||
public static String addressToUrl(String address){
|
public static String addressToUrl(String address){
|
||||||
return "http://" + address + "/";
|
return "http://" + address + "/";
|
||||||
|
|
Loading…
Reference in New Issue