com.ibm.tivoli.maximo.oslc.provider.unittest

Class urlToJSONObject

  • java.lang.Object
    • com.ibm.tivoli.maximo.oslc.provider.unittest.urlToJSONObject


  • public class urlToJSONObject
    extends java.lang.Object
    Read JSON from url
    • Constructor Summary

      Constructors 
      Constructor and Description
      urlToJSONObject() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.ibm.json.java.JSONObject get() 
      java.net.URLConnection getCon() 
      com.ibm.json.java.JSONObject httpget()
      httpget with either inputstream or errorstream
      com.ibm.json.java.JSONObject httpget2()
      Only errorstream, for stablepage testing
      void setAuth(java.lang.String user, java.lang.String pwd)
      Get JSON from url InputStream
      void setCookie(java.lang.String J_SESSION_ID)
      Set Cookie
      void setURL(java.net.URL url1)
      Set url
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • urlToJSONObject

        public urlToJSONObject()
    • Method Detail

      • setURL

        public void setURL(java.net.URL url1)
        Set url
        Parameters:
        url1 -
      • setCookie

        public void setCookie(java.lang.String J_SESSION_ID)
        Set Cookie
        Parameters:
        J_SESSION_ID -
      • setAuth

        public void setAuth(java.lang.String user,
                            java.lang.String pwd)
        Get JSON from url InputStream
        Throws:
        java.lang.Exception
      • get

        public com.ibm.json.java.JSONObject get()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • httpget

        public com.ibm.json.java.JSONObject httpget()
                                             throws java.lang.Exception
        httpget with either inputstream or errorstream
        Returns:
        Throws:
        java.lang.Exception
      • httpget2

        public com.ibm.json.java.JSONObject httpget2()
                                              throws java.lang.Exception
        Only errorstream, for stablepage testing
        Returns:
        Throws:
        java.lang.Exception
      • getCon

        public java.net.URLConnection getCon()