com.ibm.tivoli.imi.drivers.moc2007.util

Class HttpUtil

  • java.lang.Object
    • com.ibm.tivoli.imi.drivers.moc2007.util.HttpUtil


  • public class HttpUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      HttpUtil() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String createHttpConnection(java.lang.String type, IMSessionMocImpl session, java.lang.String data, java.lang.String adress)
      Method that will creat and return a new HTTPConnectio
      static java.lang.String encode(java.lang.String value)
      Make data encode
      static java.lang.String get(IMSessionMocImpl session, java.lang.String data, java.lang.String adress)
      Method responsable to create one POST HttpConnection
      static java.lang.String post(IMSessionMocImpl session, java.lang.String data, java.lang.String adress)
      Method responsable to create one GET HttpConnection
      static java.lang.String receive(java.net.HttpURLConnection conn)
      Read the response of one HTTPConnection
      • Methods inherited from class java.lang.Object

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

      • HttpUtil

        public HttpUtil()
    • Method Detail

      • post

        public static java.lang.String post(IMSessionMocImpl session,
                                            java.lang.String data,
                                            java.lang.String adress)
                                     throws IMException
        Method responsable to create one GET HttpConnection
        Parameters:
        session -
        data -
        adress -
        Returns:
        Throws:
        IMException
      • get

        public static java.lang.String get(IMSessionMocImpl session,
                                           java.lang.String data,
                                           java.lang.String adress)
                                    throws IMException
        Method responsable to create one POST HttpConnection
        Parameters:
        session -
        data -
        adress -
        Returns:
        Throws:
        IMException
      • encode

        public static java.lang.String encode(java.lang.String value)
                                       throws java.io.UnsupportedEncodingException
        Make data encode
        Parameters:
        value - that will be encode
        Returns:
        result
        Throws:
        java.io.UnsupportedEncodingException
      • receive

        public static java.lang.String receive(java.net.HttpURLConnection conn)
                                        throws java.io.IOException
        Read the response of one HTTPConnection
        Parameters:
        conn -
        Returns:
        response with the value into HttpResponse
        Throws:
        java.io.IOException
      • createHttpConnection

        public static java.lang.String createHttpConnection(java.lang.String type,
                                                            IMSessionMocImpl session,
                                                            java.lang.String data,
                                                            java.lang.String adress)
                                                     throws IMException
        Method that will creat and return a new HTTPConnectio
        Parameters:
        type - the type of connection that will be create
        session - IMI session
        data - represents the message to send
        adress - represents MOC service URL
        Returns:
        Throws:
        IMException