parent
21e0d2f626
commit
d888e61d8e
|
@ -22,6 +22,12 @@ public class DeviceRouter {
|
||||||
return devType + "_" + ipAddr;
|
return devType + "_" + ipAddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Device router factory dispose entry manager.
|
||||||
|
*
|
||||||
|
* @param device the device
|
||||||
|
* @return the dispose entry manager
|
||||||
|
*/
|
||||||
public static DisposeEntryManager deviceRouterFactory(DisposeDevice device) {
|
public static DisposeEntryManager deviceRouterFactory(DisposeDevice device) {
|
||||||
|
|
||||||
String mapKey = getMapKey(device.getType(), device.getIpAddr());
|
String mapKey = getMapKey(device.getType(), device.getIpAddr());
|
||||||
|
@ -56,11 +62,11 @@ public class DeviceRouter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device router factory dispose entry manager.
|
* Gets device router factory.
|
||||||
*
|
*
|
||||||
* @param devType the dev type
|
* @param devType the dev type
|
||||||
* @param ipAddr the ip addr
|
* @param ipAddr the ip addr
|
||||||
* @return the dispose entry manager
|
* @return the device router factory
|
||||||
*/
|
*/
|
||||||
public static DisposeEntryManager getDeviceRouterFactory(int devType, String ipAddr) {
|
public static DisposeEntryManager getDeviceRouterFactory(int devType, String ipAddr) {
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,16 @@ public class ProtocolRespDTO extends BaseProtocolDTO {
|
||||||
return result(err, getObjectJson(obj), ConstValue.Protocol.CRYPTO_NONE);
|
return result(err, getObjectJson(obj), ConstValue.Protocol.CRYPTO_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Result protocol resp dto.
|
||||||
|
*
|
||||||
|
* @param <T> the type parameter
|
||||||
|
* @param err the err
|
||||||
|
* @param obj the obj
|
||||||
|
* @param objType the obj type
|
||||||
|
* @return the protocol resp dto
|
||||||
|
* @throws JsonProcessingException the json processing exception
|
||||||
|
*/
|
||||||
public static <T> ProtocolRespDTO result(ErrorCode err, Object obj, Class<T> objType) throws JsonProcessingException {
|
public static <T> ProtocolRespDTO result(ErrorCode err, Object obj, Class<T> objType) throws JsonProcessingException {
|
||||||
return result(err, getObjectJson(obj, objType), ConstValue.Protocol.CRYPTO_NONE);
|
return result(err, getObjectJson(obj, objType), ConstValue.Protocol.CRYPTO_NONE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue