gluu
公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.xdi.oxd.client.CommandResponse2 クラス
org.xdi.oxd.client.CommandResponse2 の継承関係図
Inheritance graph
org.xdi.oxd.client.CommandResponse2 連携図
Collaboration graph

公開メンバ関数

 CommandResponse2 ()
 
 CommandResponse2 (ResponseStatus p_status)
 
 CommandResponse2 (ResponseStatus p_status, JsonNode p_data)
 
ResponseStatus getStatus ()
 
CommandResponse2 setStatus (ResponseStatus p_status)
 
JsonNode getData ()
 
CommandResponse2 setData (JsonNode p_data)
 
String toString ()
 

静的公開メンバ関数

static CommandResponse2 ok ()
 
static CommandResponse2 error ()
 

静的公開変数類

static final org.xdi.oxd.common.CommandResponse INTERNAL_ERROR_RESPONSE = org.xdi.oxd.common.CommandResponse.createInternalError()
 
static final org.xdi.oxd.common.CommandResponse OPERATION_IS_NOT_SUPPORTED = org.xdi.oxd.common.CommandResponse.createUnsupportedOperationError()
 

関数

public< T > T dataAsResponse (Class< T > p_class)
 

非公開変数類

ResponseStatus status
 
JsonNode data
 

静的非公開変数類

static final Logger LOG = LoggerFactory.getLogger(org.xdi.oxd.common.CommandResponse.class)
 

詳解

著者
yuriyz

構築子と解体子

◆ CommandResponse2() [1/3]

org.xdi.oxd.client.CommandResponse2.CommandResponse2 ( )
inline
31  {
32  }

◆ CommandResponse2() [2/3]

org.xdi.oxd.client.CommandResponse2.CommandResponse2 ( ResponseStatus  p_status)
inline
34  {
35  status = p_status;
36  }
ResponseStatus status
Definition: CommandResponse2.java:27

◆ CommandResponse2() [3/3]

org.xdi.oxd.client.CommandResponse2.CommandResponse2 ( ResponseStatus  p_status,
JsonNode  p_data 
)
inline
38  {
39  status = p_status;
40  data = p_data;
41  }
JsonNode data
Definition: CommandResponse2.java:29
ResponseStatus status
Definition: CommandResponse2.java:27

関数詳解

◆ dataAsResponse()

public<T> T org.xdi.oxd.client.CommandResponse2.dataAsResponse ( Class< T >  p_class)
inlinepackage
61  {
62  if (data != null && p_class != null) {
63  final String asString = data.toString();
64  try {
65  return CoreUtils.createJsonMapper().readValue(asString, p_class);
66  } catch (Exception e) {
67  LOG.error(e.getMessage(), e);
68  }
69  LOG.error("Unable to parse string to response, string: {}", asString);
70  }
71  return null;
72  }
JsonNode data
Definition: CommandResponse2.java:29
static final Logger LOG
Definition: CommandResponse2.java:20

◆ error()

static CommandResponse2 org.xdi.oxd.client.CommandResponse2.error ( )
inlinestatic
78  {
79  return new CommandResponse2(ResponseStatus.ERROR);
80  }
CommandResponse2()
Definition: CommandResponse2.java:31

◆ getData()

JsonNode org.xdi.oxd.client.CommandResponse2.getData ( )
inline
52  {
53  return data;
54  }
JsonNode data
Definition: CommandResponse2.java:29

◆ getStatus()

ResponseStatus org.xdi.oxd.client.CommandResponse2.getStatus ( )
inline
43  {
44  return status;
45  }
ResponseStatus status
Definition: CommandResponse2.java:27

◆ ok()

static CommandResponse2 org.xdi.oxd.client.CommandResponse2.ok ( )
inlinestatic
74  {
75  return new CommandResponse2(ResponseStatus.OK);
76  }
CommandResponse2()
Definition: CommandResponse2.java:31

◆ setData()

CommandResponse2 org.xdi.oxd.client.CommandResponse2.setData ( JsonNode  p_data)
inline
56  {
57  data = p_data;
58  return this;
59  }
JsonNode data
Definition: CommandResponse2.java:29

◆ setStatus()

CommandResponse2 org.xdi.oxd.client.CommandResponse2.setStatus ( ResponseStatus  p_status)
inline
47  {
48  status = p_status;
49  return this;
50  }
ResponseStatus status
Definition: CommandResponse2.java:27

◆ toString()

String org.xdi.oxd.client.CommandResponse2.toString ( )
inline

Returns string representation of object

戻り値
string representation of object
88  {
89  final StringBuilder sb = new StringBuilder();
90  sb.append("CommandResponse2");
91  sb.append("{status=").append(status);
92  sb.append(", params=").append(data);
93  sb.append('}');
94  return sb.toString();
95  }
JsonNode data
Definition: CommandResponse2.java:29
ResponseStatus status
Definition: CommandResponse2.java:27

メンバ詳解

◆ data

JsonNode org.xdi.oxd.client.CommandResponse2.data
private

◆ INTERNAL_ERROR_RESPONSE

final org.xdi.oxd.common.CommandResponse org.xdi.oxd.client.CommandResponse2.INTERNAL_ERROR_RESPONSE = org.xdi.oxd.common.CommandResponse.createInternalError()
static

◆ LOG

final Logger org.xdi.oxd.client.CommandResponse2.LOG = LoggerFactory.getLogger(org.xdi.oxd.common.CommandResponse.class)
staticprivate

◆ OPERATION_IS_NOT_SUPPORTED

final org.xdi.oxd.common.CommandResponse org.xdi.oxd.client.CommandResponse2.OPERATION_IS_NOT_SUPPORTED = org.xdi.oxd.common.CommandResponse.createUnsupportedOperationError()
static

◆ status

ResponseStatus org.xdi.oxd.client.CommandResponse2.status
private

このクラス詳解は次のファイルから抽出されました: