public class HTTPProxy extends Object
Modifier and Type | Field and Description |
---|---|
protected HttpServletResponse |
response |
protected URL |
url |
Constructor and Description |
---|
HTTPProxy(String requestUrl,
HttpServletResponse response)
Construct
|
Modifier and Type | Method and Description |
---|---|
protected void |
initialiseResponse(URLConnection urlConnection)
Initialise response
|
void |
service()
Perform request
|
protected void |
setRequestHeaders(URLConnection urlConnection)
Set request headers
|
protected void |
writeResponse(InputStream input,
OutputStream output)
Write response
|
protected URL url
protected HttpServletResponse response
public HTTPProxy(String requestUrl, HttpServletResponse response) throws MalformedURLException
requestUrl
- url to requestresponse
- response to write request back toMalformedURLException
public void service() throws IOException
IOException
protected void initialiseResponse(URLConnection urlConnection)
urlConnection
- url connectionprotected void setRequestHeaders(URLConnection urlConnection)
urlConnection
- url connectionprotected void writeResponse(InputStream input, OutputStream output) throws IOException
input
- input stream of requestoutput
- output stream of responseIOException
Copyright © 2005–2017 Alfresco Software. All rights reserved.