parent
b669c4b374
commit
8d95610e37
|
@ -103,4 +103,11 @@ public interface DisposeAbility {
|
|||
* Period task runtime.
|
||||
*/
|
||||
void periodTaskRuntime();
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
Boolean deviceReady();
|
||||
}
|
||||
|
|
|
@ -403,4 +403,14 @@ public class DpTechAbilityImpl implements DisposeAbility {
|
|||
|
||||
log.debug("----DpTech Period Task Running");
|
||||
}
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deviceReady() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,4 +258,14 @@ public class HaoHanAbilityImpl implements DisposeAbility {
|
|||
|
||||
log.debug("----HaoHan Period Task Running");
|
||||
}
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deviceReady() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,10 +149,13 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
|
|||
return new MulReturnType<>(ErrorCode.ERR_HUAWEI_ERROR, null);
|
||||
}
|
||||
|
||||
log.debug("----Finish HuaWei Start Cleanup Task: {}", disposeObject);
|
||||
log.info("----Finish HuaWei Start Cleanup Task: {}", disposeObject);
|
||||
return new MulReturnType<>(ErrorCode.ERR_OK, null);
|
||||
} catch (Exception ex) {
|
||||
log.error("----Exception HuaWei Start Cleanup Task: {}, {}, {}", disposeObject, nfDirection, duration);
|
||||
log.error("----Exception HuaWei Start Cleanup Task [{}]: {}, {}, {}, {}, {}", ex.getMessage(),
|
||||
disposeObject,
|
||||
nfDirection,
|
||||
duration, url, token);
|
||||
return new MulReturnType<>(ErrorCode.ERR_SYSTEMEXCEPTION, null);
|
||||
}
|
||||
}
|
||||
|
@ -190,7 +193,7 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
|
|||
}
|
||||
|
||||
try {
|
||||
log.debug("++++Begging HuaWei Stop Cleanup Task: {}", taskId);
|
||||
log.info("++++Begging HuaWei Stop Cleanup Task: {}", taskId);
|
||||
|
||||
if (capType != DisposeCapacityType.CLEANUP) {
|
||||
log.error("----Error HuaWei don't support dispose capacity type: {}", capType);
|
||||
|
@ -220,10 +223,12 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
|
|||
return new MulReturnType<>(ErrorCode.ERR_CALLDEVICE, null);
|
||||
}
|
||||
|
||||
log.debug("----Finish HuaWei Stop Cleanup Task: {}", taskId);
|
||||
log.info("----Finish HuaWei Stop Cleanup Task: {}", taskId);
|
||||
return new MulReturnType<>(ErrorCode.ERR_OK, null);
|
||||
} catch (Exception ex) {
|
||||
log.error("----Exception HuaWei Stop Cleanup Task: {}, {}, {}", disposeObject, nfDirection, taskId);
|
||||
log.error("----Exception HuaWei Stop Cleanup Task [{}]: {}, {}, {}, {}", ex.getMessage(),
|
||||
disposeObject,
|
||||
nfDirection, url, token);
|
||||
return new MulReturnType<>(ErrorCode.ERR_SYSTEMEXCEPTION, null);
|
||||
}
|
||||
}
|
||||
|
@ -364,5 +369,15 @@ public class HuaWeiAbilityImpl implements DisposeAbility {
|
|||
|
||||
log.debug("----HuaWei Period Task Running");
|
||||
}
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deviceReady() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -518,4 +518,14 @@ public class PengXinAbilityImpl implements DisposeAbility {
|
|||
|
||||
log.debug("----PengXin Period Task Running");
|
||||
}
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deviceReady() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,4 +151,14 @@ public class VirtualAbilityImpl implements DisposeAbility {
|
|||
public void periodTaskRuntime() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Device ready boolean.
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deviceReady() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.dispose.pojo.dto.protocol.device.ability;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Hashtable;
|
||||
|
||||
/**
|
||||
* The type Dp protect object.
|
||||
*
|
||||
* @author <huangxin@cmhi.chinamoblie.com>
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DpProtectObject {
|
||||
/**
|
||||
* The Protect name.
|
||||
*/
|
||||
private String protectName;
|
||||
|
||||
/**
|
||||
* The Detection devices.
|
||||
*/
|
||||
private String detectionDevices;
|
||||
|
||||
/**
|
||||
* The Cleanup devices.
|
||||
*/
|
||||
private String cleanupDevices;
|
||||
|
||||
/**
|
||||
* The Ip segment v 4.
|
||||
*/
|
||||
private Hashtable<String, String> ipSegment;
|
||||
}
|
|
@ -5,6 +5,7 @@ import com.dispose.common.ErrorCode;
|
|||
import com.dispose.restful.RestfulInterface;
|
||||
import com.huawei.dispose.common.HuaWeiCreatDivertReq;
|
||||
import com.huawei.dispose.common.HuaWeiLoginReq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -14,6 +15,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
*
|
||||
* @author <huangxin@cmhi.chinamoblie.com>
|
||||
*/
|
||||
@Slf4j
|
||||
public class HuaWeiInterface {
|
||||
/**
|
||||
* Auth http response.
|
||||
|
@ -60,6 +62,8 @@ public class HuaWeiInterface {
|
|||
}
|
||||
}
|
||||
|
||||
log.error("----HuaWei response [{}]: {}", response == null ? -1 : response.getStatus(), response);
|
||||
|
||||
return ErrorCode.ERR_UNKNOWNCMD;
|
||||
}
|
||||
|
||||
|
@ -92,6 +96,7 @@ public class HuaWeiInterface {
|
|||
}
|
||||
}
|
||||
|
||||
log.error("----HuaWei response [{}]: {}", response == null ? -1 : response.getStatus(), response);
|
||||
return ErrorCode.ERR_UNKNOWNCMD;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue