org.httpobjects.proxy
Class Proxy

java.lang.Object
  extended by org.httpobjects.DSL
      extended by org.httpobjects.HttpObject
          extended by org.httpobjects.proxy.Proxy

public class Proxy
extends HttpObject


Field Summary
 
Fields inherited from class org.httpobjects.DSL
DEFAULT_HTTP_ENCODING, MOST_WIDELY_SUPPORTED_ENCODING
 
Constructor Summary
Proxy(String base, String me)
           
Proxy(String localPath, String base, String me)
           
 
Method Summary
protected  void addRequestHeaders(Request req, org.apache.commons.httpclient.HttpMethodBase method)
           
protected  org.apache.commons.httpclient.HttpClient createHttpClient()
           
protected  Response createResponse(org.apache.commons.httpclient.HttpMethodBase method, ResponseCode responseCode, List<HeaderField> headersReturned)
           
 Response delete(Request req)
           
protected  Response executeMethod(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethodBase method, Request req)
           
protected  List<HeaderField> extractResponseHeaders(org.apache.commons.httpclient.HttpMethodBase method)
           
 Response get(Request req)
           
 String getBase()
           
protected  String getQuery(Request req)
           
 Response post(Request req)
           
protected  String processRedirect(String url)
           
protected  String processUrl(String url)
           
protected  Response proxyRequest(Request req, org.apache.commons.httpclient.HttpMethodBase method)
           
 Response put(Request req)
           
 void setBase(String base)
           
protected  void setRequestRepresentation(Request req, org.apache.commons.httpclient.methods.EntityEnclosingMethod method)
           
protected static String stripTrailingSlash(String text)
           
 
Methods inherited from class org.httpobjects.HttpObject
head, options, patch, pattern, trace
 
Methods inherited from class org.httpobjects.DSL
BAD_GATEWAY, BAD_GATEWAY, BAD_GATEWAY, BAD_REQUEST, BAD_REQUEST, BasicAuthentication, Bytes, Bytes, classpathResourcesAt, CONFLICT, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, EXPECTATION_FAILED, File, FORBIDDEN, FORBIDDEN, FromClasspath, FromClasspath, GATEWAY_TIMEOUT, GATEWAY_TIMEOUT, GATEWAY_TIMEOUT, getBytes, GONE, GONE, Html, HtmlFromClasspath, HtmlFromClasspath, HTTP_VERSION_NOT_SUPPORTED, HTTP_VERSION_NOT_SUPPORTED, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR, Json, LENGTH_REQUIRED, LENGTH_REQUIRED, Location, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, NO_CONTENT, NOT_ACCEPTABLE, NOT_ACCEPTABLE, NOT_FOUND, NOT_FOUND, NOT_IMPLEMENTED, NOT_IMPLEMENTED, NOT_IMPLEMENTED, OK, PAYMENT_REQUIRED, PAYMENT_REQUIRED, PRECONDITION_FAILED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, REQUESTED_RANGE_NOT_SATISFIABLE, SEE_OTHER, SEE_OTHER, SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE, SetCookie, SWITCHING_PROTOCOLS, Text, UNAUTHORIZED, UNAUTHORIZED, UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, UNSUPPORTED_MEDIA_TYPE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Proxy

public Proxy(String localPath,
             String base,
             String me)

Proxy

public Proxy(String base,
             String me)
Method Detail

setBase

public void setBase(String base)

getBase

public String getBase()

get

public Response get(Request req)
Overrides:
get in class HttpObject

delete

public Response delete(Request req)
Overrides:
delete in class HttpObject

put

public Response put(Request req)
Overrides:
put in class HttpObject

setRequestRepresentation

protected void setRequestRepresentation(Request req,
                                        org.apache.commons.httpclient.methods.EntityEnclosingMethod method)

post

public Response post(Request req)
Overrides:
post in class HttpObject

getQuery

protected String getQuery(Request req)

processUrl

protected String processUrl(String url)

proxyRequest

protected Response proxyRequest(Request req,
                                org.apache.commons.httpclient.HttpMethodBase method)

executeMethod

protected Response executeMethod(org.apache.commons.httpclient.HttpClient client,
                                 org.apache.commons.httpclient.HttpMethodBase method,
                                 Request req)

createHttpClient

protected org.apache.commons.httpclient.HttpClient createHttpClient()

addRequestHeaders

protected void addRequestHeaders(Request req,
                                 org.apache.commons.httpclient.HttpMethodBase method)

extractResponseHeaders

protected List<HeaderField> extractResponseHeaders(org.apache.commons.httpclient.HttpMethodBase method)

processRedirect

protected String processRedirect(String url)

createResponse

protected Response createResponse(org.apache.commons.httpclient.HttpMethodBase method,
                                  ResponseCode responseCode,
                                  List<HeaderField> headersReturned)

stripTrailingSlash

protected static final String stripTrailingSlash(String text)


Copyright © 2015. All Rights Reserved.