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 theHttpRequest
interface.
-
-
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
_headerFields
protected HttpMethod
_httpMethod
protected Url
_url
-
Constructor Summary
Constructors Constructor Description HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl)
Constructs aHttpRequest
with all required attributes.HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields)
Constructs aHttpRequest
with all required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestHeaderFields
getHeaderFields()
Retrieves the Header-Fields from the Header-Fields property.HttpMethod
getHttpMethod()
Retrieves the HTTP-Method from the HTTP-Method property.Url
getUrl()
-
-
-
Field Detail
-
_httpMethod
protected HttpMethod _httpMethod
-
_url
protected Url _url
-
_headerFields
protected RequestHeaderFields _headerFields
-
-
Constructor Detail
-
HttpRequestImpl
public HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl)
Constructs aHttpRequest
with all required attributes.- Parameters:
aHttpMethod
- TheHttpMethod
with which the request has been sent.aUrl
- TheUrl
from which to take the URL specific data.
-
HttpRequestImpl
public HttpRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields)
Constructs aHttpRequest
with all required attributes.- Parameters:
aHttpMethod
- TheHttpMethod
with which the request has been sent.aUrl
- TheUrl
from which to take the URL specific data.aHeaderFields
- TheRequestHeaderFields
sent by the request.
-
-
Method Detail
-
getHttpMethod
public HttpMethod getHttpMethod()
Retrieves the HTTP-Method from the HTTP-Method property.- Specified by:
getHttpMethod
in interfaceHttpMethodAccessor
- Returns:
- The HTTP-Method stored by the HTTP-Method property.
-
getUrl
public Url getUrl()
- Specified by:
getUrl
in interfaceUrlAccessor
- Returns:
- The Url stored by the
Url
property.
-
getHeaderFields
public RequestHeaderFields getHeaderFields()
Retrieves the Header-Fields from the Header-Fields property.- Specified by:
getHeaderFields
in interfaceHeaderFieldsAccessor<RequestHeaderFields>
- Returns:
- The Header-Fields stored by the Header-Fields property.
-
-