类 BaseCmd
- java.lang.Object
-
- network.nerve.core.rpc.cmd.BaseCmd
-
- 直接已知子类:
KernelCmd4Test,ModuleStatusCmd,ParamCmd
public abstract class BaseCmd extends Object
所有对外提供的接口的父类,必须继承BaseCmd才能被反射调用到 The parent class of all externally provided interfaces, must inherit BaseCmd to be invoked by reflection- 作者:
- tangyi
-
-
构造器概要
构造器 构造器 说明 BaseCmd()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Responsefailed(String errMsg)返回自定义错误消息的失败对象 Returns the failed object of the custom error messageprotected Responsefailed(ErrorCode errorCode)返回预定义的失败对象 Returns the predefined failed objectprotected Responsefailed(ErrorCode errorCode, String errMsg)预定义失败对象,同时带有自定义错误消息 Predefined failed object with a custom error messageprotected voidsetConfigItem(String key, Object value, boolean readOnly)设置模块配置参数 Setting Module Configuration Parametersprotected Responsesuccess()返回基本的成功对象 Returns the basic success objectprotected Responsesuccess(Object responseData)返回有特定内容的成功对象 Returns a success object with specific content
-
-
-
方法详细资料
-
setConfigItem
protected void setConfigItem(String key, Object value, boolean readOnly)
设置模块配置参数 Setting Module Configuration Parameters- 参数:
key- Keyvalue- ValuereadOnly- Read only?
-
success
protected Response success()
返回基本的成功对象 Returns the basic success object- 返回:
- Response
-
success
protected Response success(Object responseData)
返回有特定内容的成功对象 Returns a success object with specific content- 参数:
responseData- Object, can be any values- 返回:
- Response
-
failed
protected Response failed(ErrorCode errorCode)
返回预定义的失败对象 Returns the predefined failed object- 参数:
errorCode- ErrorCode- 返回:
- Response
-
failed
protected Response failed(String errMsg)
返回自定义错误消息的失败对象 Returns the failed object of the custom error message- 参数:
errMsg- User defined error message- 返回:
- Response
-
-