Class RestResponseEvent
java.lang.Object
org.refcodes.web.AbstractHttpResponse
org.refcodes.web.HttpClientResponse
org.refcodes.rest.RestResponse
org.refcodes.rest.RestResponseEvent
- All Implemented Interfaces:
ActionAccessor<HttpStatusCode>, SourceAccessor<RestServer>, ActionEvent<HttpStatusCode, RestServer>, Event<RestServer>, HeaderFieldsAccessor<ResponseHeaderFields>, HttpBodyAccessor, HttpInputStreamAccessor, HttpResponse, HttpStatusCodeAccessor, LocalAddressAccessor, RemoteAddressAccessor, UrlAccessor
public class RestResponseEvent
extends RestResponse
implements ActionEvent<HttpStatusCode, RestServer>
Defines a
RestResponseEvent being the response as consumed by a
RestResponseHandler's RestResponseConsumer. Usually you will
use RestRequestClient.onResponse(HttpMethod, String, RestResponseConsumer)
or the like for registering a RestResponseConsumer to the
RestClient (HttpRestClient).-
Nested Class Summary
Nested classes/interfaces inherited from interface ActionAccessor
ActionAccessor.ActionBuilder<A,B>, ActionAccessor.ActionMutator<A>, ActionAccessor.ActionProperty<A> Nested classes/interfaces inherited from interface HeaderFieldsAccessor
HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>, HeaderFieldsAccessor.HeaderFieldsMutator<T>, HeaderFieldsAccessor.HeaderFieldsProperty<T> Nested classes/interfaces inherited from interface HttpBodyAccessor
HttpBodyAccessor.HttpBodyBuilder<B>, HttpBodyAccessor.HttpBodyMutator, HttpBodyAccessor.HttpBodyProperty, HttpBodyAccessor.HttpBodyProvider<EXC>Nested classes/interfaces inherited from interface HttpInputStreamAccessor
HttpInputStreamAccessor.HttpInputStreamBuilder<B>, HttpInputStreamAccessor.HttpInputStreamMutator, HttpInputStreamAccessor.HttpInputStreamProperty, HttpInputStreamAccessor.HttpInputStreamProvider<EXC>Nested classes/interfaces inherited from interface HttpStatusCodeAccessor
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodePropertyNested classes/interfaces inherited from interface LocalAddressAccessor
LocalAddressAccessor.LocalAddressBuilder<B>, LocalAddressAccessor.LocalAddressMutator, LocalAddressAccessor.LocalAddressPropertyNested classes/interfaces inherited from interface RemoteAddressAccessor
RemoteAddressAccessor.RemoteAddressBuilder<B>, RemoteAddressAccessor.RemoteAddressMutator, RemoteAddressAccessor.RemoteAddressPropertyNested classes/interfaces inherited from interface SourceAccessor
SourceAccessor.SourceBuilder<SRC,B>, SourceAccessor.SourceMutator<SRC>, SourceAccessor.SourceProperty<SRC> Nested classes/interfaces inherited from interface UrlAccessor
UrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty -
Field Summary
Fields inherited from class HttpClientResponse
_mediaTypeFactoryLookupFields inherited from class AbstractHttpResponse
_httpStatusCode -
Constructor Summary
ConstructorsConstructorDescriptionRestResponseEvent(RestResponse aRestResponse, RestClient aRestClient) Constructs aRestResponseEventwith all required attributes.RestResponseEvent(Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, HttpStatusCode aHttpStatusCode, ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, RestClient aRestClient) Constructs aRestResponseEventwith all required attributes. -
Method Summary
Methods inherited from class RestResponse
getLocalAddress, getRemoteAddressMethods inherited from class HttpClientResponse
getHttpBody, getHttpInputStream, getResponse, getResponse, getUrl, toStringMethods inherited from class AbstractHttpResponse
getHeaderFields, getHttpStatusCode
-
Constructor Details
-
RestResponseEvent
Constructs aRestResponseEventwith all required attributes.- Parameters:
aRestResponse- The response with all the required attributes to be used for the event.aRestClient- The system firing the event.
-
RestResponseEvent
public RestResponseEvent(Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, HttpStatusCode aHttpStatusCode, ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, RestClient aRestClient) Constructs aRestResponseEventwith all required attributes.- Parameters:
aUrl- The URL from which the response originates.aLocalAddress- The local address where the event is being received.aRemoteAddress- The remote address from which the request originates.aHttpStatusCode- TheHttpStatusCodeof the response.aHeaderFields- TheResponseHeaderFieldssent by the response.aHttpInputStream- TheInputStreamrepresenting the request's HTTP body.aRestClient- The system firing the event.
-
-
Method Details
-
getSource
- Specified by:
getSourcein interfaceSourceAccessor<RestServer>
-
getAction
- Specified by:
getActionin interfaceActionAccessor<HttpStatusCode>
-