|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.gae.http.GHttpBinding
public class GHttpBinding
Binds the HTTPRequest/HTTPResponse pair of the URL fetch
service to a Camel Exchange.
| Constructor Summary | |
|---|---|
GHttpBinding()
|
|
| Method Summary | |
|---|---|
protected com.google.appengine.api.urlfetch.HTTPMethod |
getRequestMethod(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange)
|
protected URL |
getRequestUrl(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange)
|
protected String |
getResponseHeader(String name,
com.google.appengine.api.urlfetch.HTTPResponse response)
|
org.apache.camel.Exchange |
readRequest(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletRequest request)
Populates an Exchange from request data and endpoint configuration data. |
protected void |
readRequestHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletRequest request)
|
org.apache.camel.Exchange |
readResponse(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
Reads data from response and writes it to the out-message of
the exchange. |
protected void |
readResponseBody(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
|
protected void |
readResponseHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
|
com.google.appengine.api.urlfetch.HTTPRequest |
writeRequest(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
Reads data from exchange and writes it to a newly created
HTTPRequest instance. |
protected void |
writeRequestBody(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
|
protected void |
writeRequestHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
|
javax.servlet.http.HttpServletResponse |
writeResponse(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletResponse response)
Creates or populates a response object from Exchange and endpoint configuration data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GHttpBinding()
| Method Detail |
|---|
public org.apache.camel.Exchange readResponse(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
throws Exception
response and writes it to the out-message of
the exchange.
readResponse in interface OutboundBinding<GHttpEndpoint,com.google.appengine.api.urlfetch.HTTPRequest,com.google.appengine.api.urlfetch.HTTPResponse>endpoint - exchange - response -
exchange instance populated with
response data.
GHttpException - if the response code is >= 400 and
HttpEndpoint.isThrowExceptionOnFailure() returns
true.
Exception
public com.google.appengine.api.urlfetch.HTTPRequest writeRequest(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
throws Exception
exchange and writes it to a newly created
HTTPRequest instance. The request parameter is
ignored.
writeRequest in interface OutboundBinding<GHttpEndpoint,com.google.appengine.api.urlfetch.HTTPRequest,com.google.appengine.api.urlfetch.HTTPResponse>endpoint - exchange - request - ignored.
HTTPRequest instance containing data from
exchange.
Exception
public org.apache.camel.Exchange readRequest(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletRequest request)
InboundBindingExchange from request data and endpoint configuration data.
readRequest in interface InboundBinding<GHttpEndpoint,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>endpoint - endpoint providing binding-relevant information.exchange - exchange to be populated or created (if null) from request data.request - request to read data from.
public javax.servlet.http.HttpServletResponse writeResponse(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletResponse response)
InboundBindingExchange and endpoint configuration data.
writeResponse in interface InboundBinding<GHttpEndpoint,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse>endpoint - endpoint providing binding-relevant information.exchange - exchange to read data from.response - to be populated or created (if null) from exchange data.
protected void readResponseHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
protected void readRequestHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletRequest request)
protected void writeRequestHeaders(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
protected void readResponseBody(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPResponse response)
throws Exception
Exception
protected void writeRequestBody(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.appengine.api.urlfetch.HTTPRequest request)
protected URL getRequestUrl(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange)
throws Exception
Exception
protected com.google.appengine.api.urlfetch.HTTPMethod getRequestMethod(GHttpEndpoint endpoint,
org.apache.camel.Exchange exchange)
protected String getResponseHeader(String name,
com.google.appengine.api.urlfetch.HTTPResponse response)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||