@Immutable @ThreadSafe public class CamelJettyHttpRequest extends Object implements HttpRequest
HttpRequest to use with CamelJettyHttpSpy.
This implementation is immutable and contains immutable fields.
TODO test.
| Constructor and Description |
|---|
CamelJettyHttpRequest(org.apache.camel.Exchange exchange)
Create new request from Exchange.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBody()
Gets body.
|
Map<String,List<String>> |
getHeaders()
Gets headers.
|
List<String> |
getHeaderValues(String name)
Gets all values of specified header.
|
String |
getMethod()
Gets HTTP method.
|
String |
getPath()
Gets HTTP path.
|
public CamelJettyHttpRequest(org.apache.camel.Exchange exchange)
throws IOException
exchange - Exchange object.NullPointerException - Exchange is null.IllegalArgumentException - Exchange does not contain HTTP In
message.IOException - Cannot read HTTP request body.public String getMethod()
HttpRequestgetMethod in interface HttpRequestpublic String getPath()
HttpRequestgetPath in interface HttpRequestpublic String getBody()
HttpRequestgetBody in interface HttpRequestpublic Map<String,List<String>> getHeaders()
HttpRequestgetHeaders in interface HttpRequestpublic List<String> getHeaderValues(String name)
HttpRequestgetHeaderValues in interface HttpRequestname - Name of the header.Copyright © 2016. All rights reserved.