org.alfresco.web.app.servlet
Class HTTPProxy

java.lang.Object
  extended by org.alfresco.web.app.servlet.HTTPProxy

public class HTTPProxy
extends java.lang.Object

Simple server-side HTTP Request / Response


Field Summary
protected  javax.servlet.http.HttpServletResponse response
           
protected  java.net.URL url
           
 
Constructor Summary
HTTPProxy(java.lang.String requestUrl, javax.servlet.http.HttpServletResponse response)
          Construct
 
Method Summary
protected  void initialiseResponse(java.net.URLConnection urlConnection)
          Initialise response
 void service()
          Perform request
protected  void setRequestHeaders(java.net.URLConnection urlConnection)
          Set request headers
protected  void writeResponse(java.io.InputStream input, java.io.OutputStream output)
          Write response
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.net.URL url

response

protected javax.servlet.http.HttpServletResponse response
Constructor Detail

HTTPProxy

public HTTPProxy(java.lang.String requestUrl,
                 javax.servlet.http.HttpServletResponse response)
          throws java.net.MalformedURLException
Construct

Parameters:
requestUrl - url to request
response - response to write request back to
Throws:
java.net.MalformedURLException
Method Detail

service

public void service()
             throws java.io.IOException
Perform request

Throws:
java.io.IOException

initialiseResponse

protected void initialiseResponse(java.net.URLConnection urlConnection)
Initialise response

Parameters:
urlConnection - url connection

setRequestHeaders

protected void setRequestHeaders(java.net.URLConnection urlConnection)
Set request headers

Parameters:
urlConnection - url connection

writeResponse

protected void writeResponse(java.io.InputStream input,
                             java.io.OutputStream output)
                      throws java.io.IOException
Write response

Parameters:
input - input stream of request
output - output stream of response
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.