Package org.refcodes.net
Class HttpRequestImpl
- java.lang.Object
-
- org.refcodes.net.HttpRequestImpl
-
- All Implemented Interfaces:
HeaderFieldsAccessor<RequestHeaderFields>,HttpMethodAccessor,HttpRequest,UrlAccessor
- Direct Known Subclasses:
HttpClientRequestImpl,HttpServerRequestImpl
public class HttpRequestImpl extends java.lang.Object implements HttpRequest
Implementation of theHttpRequestinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.HeaderFieldsAccessor
HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpMethodAccessor
HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.UrlAccessor
UrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected RequestHeaderFields_headerFieldsprotected HttpMethod_httpMethodprotected Url_url
-
Constructor Summary
Constructors Constructor Description HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl)Constructs aHttpRequestwith all required attributes.HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields)Constructs aHttpRequestwith all required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestHeaderFieldsgetHeaderFields()Retrieves the Header-Fields from the Header-Fields property.HttpMethodgetHttpMethod()Retrieves the HTTP-Method from the HTTP-Method property.UrlgetUrl()
-
-
-
Field Detail
-
_httpMethod
protected HttpMethod _httpMethod
-
_url
protected Url _url
-
_headerFields
protected RequestHeaderFields _headerFields
-
-
Constructor Detail
-
HttpRequestImpl
public HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl)
Constructs aHttpRequestwith all required attributes.- Parameters:
aHttpMethod- TheHttpMethodwith which the request has been sent.aUrl- TheUrlfrom which to take the URL specific data.
-
HttpRequestImpl
public HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields)
Constructs aHttpRequestwith all required attributes.- Parameters:
aHttpMethod- TheHttpMethodwith which the request has been sent.aUrl- TheUrlfrom which to take the URL specific data.aHeaderFields- TheRequestHeaderFieldssent by the request.
-
-
Method Detail
-
getHttpMethod
public HttpMethod getHttpMethod()
Retrieves the HTTP-Method from the HTTP-Method property.- Specified by:
getHttpMethodin interfaceHttpMethodAccessor- Returns:
- The HTTP-Method stored by the HTTP-Method property.
-
getUrl
public Url getUrl()
- Specified by:
getUrlin interfaceUrlAccessor- Returns:
- The Url stored by the
Urlproperty.
-
getHeaderFields
public RequestHeaderFields getHeaderFields()
Retrieves the Header-Fields from the Header-Fields property.- Specified by:
getHeaderFieldsin interfaceHeaderFieldsAccessor<RequestHeaderFields>- Returns:
- The Header-Fields stored by the Header-Fields property.
-
-