OpenShift Java Client 2.5.0.Final

com.openshift.internal.client.response
Class RestResponse

java.lang.Object
  extended by com.openshift.internal.client.response.RestResponse

public class RestResponse
extends Object

The Class Response.


Constructor Summary
protected RestResponse(String status, Messages messages, Object data, EnumDataType dataType)
          Instantiates a new response.
 
Method Summary
<T> T
getData()
          Gets the data.
 EnumDataType getDataType()
          Gets the data type.
 Messages getMessages()
          Gets the messages.
 String getStatus()
          Gets the status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestResponse

protected RestResponse(String status,
                       Messages messages,
                       Object data,
                       EnumDataType dataType)
Instantiates a new response.

Parameters:
status - the status
messages - the messages
data - the data
dataType - the data type
Method Detail

getStatus

public final String getStatus()
Gets the status.

Returns:
the status

getMessages

public final Messages getMessages()
Gets the messages.

Returns:
the messages

getDataType

public final EnumDataType getDataType()
Gets the data type.

Returns:
the dataType

getData

public final <T> T getData()
Gets the data.

Type Parameters:
T - the generic type
Returns:
the data, casted as the caller requires. To avoid ClassCastExceptions, caller may refer to the getDataType() method to discover the actual type of the data.

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.