com.shephertz.app42.paas.sdk.jme.session
Class SessionResponseBuilder

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.App42ResponseBuilder
      extended by com.shephertz.app42.paas.sdk.jme.session.SessionResponseBuilder

public class SessionResponseBuilder
extends App42ResponseBuilder

SessionResponseBuilder class converts the JSON response retrieved from the server to the value object i.e Session


Constructor Summary
SessionResponseBuilder()
           
 
Method Summary
 void buildObjectFromJSONTree(java.lang.Object obj, org.json.jme.JSONObject jsonObj)
          Handling the session and attribute object.
 Session buildResponse(java.lang.String json)
          Converts the response in JSON format to the value object i.e Session
static void main(java.lang.String[] args)
          Main method creating a new Sessionobject resulting into a response that has to be displayed.
 
Methods inherited from class com.shephertz.app42.paas.sdk.jme.App42ResponseBuilder
getNames, getServiceJSONObject, getTotalRecords, isResponseSuccess
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionResponseBuilder

public SessionResponseBuilder()
Method Detail

buildObjectFromJSONTree

public void buildObjectFromJSONTree(java.lang.Object obj,
                                    org.json.jme.JSONObject jsonObj)
                             throws java.lang.Exception
Handling the session and attribute object.

Specified by:
buildObjectFromJSONTree in class App42ResponseBuilder
Parameters:
json - - response in JSON format
Throws:
java.lang.Exception

buildResponse

public Session buildResponse(java.lang.String json)
                      throws java.lang.Exception
Converts the response in JSON format to the value object i.e Session

Parameters:
json - - response in JSON format
Returns:
Session object filled with json data
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method creating a new Sessionobject resulting into a response that has to be displayed.

Throws:
java.lang.Exception