公共类响应消息{
privatefinalstaticstringstatus _ ok='0';
privatefinalstaticstringstatus _ error='1';
私有字符串状态; //状态
私有对象数据; //返回值
private Exception e; //异常捕获
private薄大衣; //个性化奋斗大厦
公共字符串获取状态
返回状态;
}
公共语音集状态(string status )。
this.status=status;
}
公共对象获取数据
返回数据;
}
公共void setdata (objectdata ) {
this.data=data;
}
公共扩展获取
返回e;
}
公共void sete (exception e ) {
this.e=e;
}
公共字符串获取(
return msg;
}
薄外套)。
this.msg=msg;
}
公共响应消息
super (;
}
publicresponsemessage (string status,Object data,Exception e,轻薄外套) {
super (;
this.status=status;
this.data=data;
this.e=e;
this.msg=msg;
}
//*
publicstaticresponsemessagenewokinstance (objectdata,轻薄外套) {
returnnewresponsemessage (response message.status _ ok,data,null,msg );
}
//*
publicresponsemessagenewokinstance {
returnnewresponsemessage (response message.status _ ok,data,null,null );
}
//*
publicstaticresponsemessagenewerrorinstance {
returnnewresponsemessage (response message.status _ error,null,null,msg );
}
//*
publicstaticresponsemessagenewerrorinstance {
returnnewresponsemessage (response message.status _ error,null,e,msg );
}
}