org.jboss.errai.tools.proxy
Class XmlHttpProxy
java.lang.Object
org.jboss.errai.tools.proxy.XmlHttpProxy
public class XmlHttpProxy
- extends Object
- Author:
- Greg Murray, Heiko Braun
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 |
GET
public static String GET
POST
public static String POST
DELETE
public static String DELETE
PUT
public static String PUT
XmlHttpProxy
public XmlHttpProxy()
XmlHttpProxy
public XmlHttpProxy(String proxyHost,
int proxyPort)
XmlHttpProxy
public XmlHttpProxy(String proxyHost,
int proxyPort,
String userName,
String password)
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 upout
- - The OutputStream to which the resulting document is writtenxslInputStream
- - An input Stream to an XSL style sheet that is provided to the XSLT processor. If set to null there will be no transformationparamsMap
- - 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 upout
- - 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 upout
- - The OutputStream to which the resulting document is writtenxslInputStream
- - An input Stream to an XSL style sheet that is provided to the XSLT processor. If set to null there will be no transformationparamsMap
- - 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 authorizationpassword
- - 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)
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.