Errai 3.0.1-SNAPSHOT

org.jboss.errai.tools.proxy
Class XmlHttpProxy

java.lang.Object
  extended by org.jboss.errai.tools.proxy.XmlHttpProxy

public class XmlHttpProxy
extends Object

Author:
Greg Murray, Heiko Braun

Nested Class Summary
 class XmlHttpProxy.Cookie
           
static interface XmlHttpProxy.CookieCallback
           
 
Field Summary
static String DELETE
           
static String GET
           
static String POST
           
static String PUT
           
 
Constructor Summary
XmlHttpProxy()
           
XmlHttpProxy(String proxyHost, int proxyPort)
           
XmlHttpProxy(String proxyHost, int proxyPort, String userName, String password)
           
 
Method Summary
 void doPost(String urlString, OutputStream out, InputStream xslInputStream, Map paramsMap, Map headers, String postData, String postContentType, String userName, String password)
          This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.
 void doProcess(String urlString, OutputStream out, InputStream xslInputStream, Map paramsMap, Map headers, String method, String postData, String postContentType, String userName, String password)
          This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.
static Logger getLogger()
          CLI to the XmlHttpProxy
static ProxyConfig loadServices(InputStream is)
           
 void processRequest(String urlString, OutputStream out, InputStream xslInputStream, Map paramsMap, Map headers, String method, String userName, String password)
          This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.
 void transform(InputStream xmlIS, InputStream xslIS, Map params, OutputStream result, String encoding)
          Do the XSLT transformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET

public static String GET

POST

public static String POST

DELETE

public static String DELETE

PUT

public static String PUT
Constructor Detail

XmlHttpProxy

public XmlHttpProxy()

XmlHttpProxy

public XmlHttpProxy(String proxyHost,
                    int proxyPort)

XmlHttpProxy

public XmlHttpProxy(String proxyHost,
                    int proxyPort,
                    String userName,
                    String password)
Method Detail

processRequest

public void processRequest(String urlString,
                           OutputStream out,
                           InputStream xslInputStream,
                           Map paramsMap,
                           Map headers,
                           String method,
                           String userName,
                           String password)
                    throws IOException,
                           MalformedURLException
This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.

Parameters:
urlString - - The URL which you are looking up
out - - The OutputStream to which the resulting document is written
xslInputStream - - An input Stream to an XSL style sheet that is provided to the XSLT processor. If set to null there will be no transformation
paramsMap - - A Map of parameters that are feed to the XSLT Processor. These params may be used when generating content. This may be set to null if no parameters are necessary.
method - - The HTTP method used.
Throws:
IOException
MalformedURLException

doPost

public void doPost(String urlString,
                   OutputStream out,
                   InputStream xslInputStream,
                   Map paramsMap,
                   Map headers,
                   String postData,
                   String postContentType,
                   String userName,
                   String password)
            throws IOException,
                   MalformedURLException
This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.

Parameters:
urlString - - The URL which you are looking up
out - - The OutputStream to which the resulting document is written
Throws:
IOException
MalformedURLException

doProcess

public void doProcess(String urlString,
                      OutputStream out,
                      InputStream xslInputStream,
                      Map paramsMap,
                      Map headers,
                      String method,
                      String postData,
                      String postContentType,
                      String userName,
                      String password)
               throws IOException,
                      MalformedURLException
This method will go out and make the call and it will apply an XSLT Transformation with the set of parameters provided.

Parameters:
urlString - - The URL which you are looking up
out - - The OutputStream to which the resulting document is written
xslInputStream - - An input Stream to an XSL style sheet that is provided to the XSLT processor. If set to null there will be no transformation
paramsMap - - A Map of parameters that are feed to the XSLT Processor. These params may be used when generating content. This may be set to null if no parameters are necessary.
method - - the HTTP method used.
postData - - A String of the bodyContent to be posted. A doPost will be used if this is parameter is not null.
postContentType - - The request contentType used when posting data. Will not be set if this parameter is null.
userName - - userName used for basic authorization
password - - password used for basic authorization
Throws:
IOException
MalformedURLException

transform

public void transform(InputStream xmlIS,
                      InputStream xslIS,
                      Map params,
                      OutputStream result,
                      String encoding)
Do the XSLT transformation


getLogger

public static Logger getLogger()
CLI to the XmlHttpProxy


loadServices

public static ProxyConfig loadServices(InputStream is)

Errai 3.0.1-SNAPSHOT

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