public class GridRestResponse extends Object implements Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_AUTH_FAILED
Authentication failure.
|
static int |
STATUS_FAILED
Command failed.
|
static int |
STATUS_SECURITY_CHECK_FAILED
Security check failed.
|
static int |
STATUS_SUCCESS
Command succeeded.
|
Constructor and Description |
---|
GridRestResponse() |
GridRestResponse(int status,
String err)
Constructs failed rest response.
|
GridRestResponse(Object obj)
Constructs successful rest response.
|
Modifier and Type | Method and Description |
---|---|
String |
getError() |
Object |
getResponse() |
String |
getSessionToken() |
int |
getSuccessStatus() |
void |
readExternal(ObjectInput in) |
byte[] |
sessionTokenBytes() |
void |
sessionTokenBytes(byte[] sesTokBytes) |
void |
setError(String err) |
void |
setResponse(Object obj) |
void |
setSessionToken(String sesTokStr) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final int STATUS_SUCCESS
public static final int STATUS_FAILED
public static final int STATUS_AUTH_FAILED
public static final int STATUS_SECURITY_CHECK_FAILED
public GridRestResponse()
public GridRestResponse(Object obj)
obj
- Response object.public GridRestResponse(int status, @Nullable String err)
status
- Response status.err
- Error, null
if success is true
.public int getSuccessStatus()
public Object getResponse()
public void setResponse(@Nullable Object obj)
obj
- Response object.public String getError()
public void setError(String err)
err
- Error.public byte[] sessionTokenBytes()
public void sessionTokenBytes(@Nullable byte[] sesTokBytes)
sesTokBytes
- Session token for remote client.public String getSessionToken()
public void setSessionToken(@Nullable String sesTokStr)
sesTokStr
- String representation of session token.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017