- java.lang.Object
-
- org.refcodes.web.AbstractHttpResponse
-
- org.refcodes.web.HttpClientResponseImpl
-
- org.refcodes.rest.RestResponseImpl
-
- org.refcodes.rest.RestResponseEvent
-
- All Implemented Interfaces:
org.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpStatusCode>,org.refcodes.mixin.Dumpable,org.refcodes.mixin.SourceAccessor<RestServer>,org.refcodes.observer.GenericActionEvent<org.refcodes.web.HttpStatusCode,RestServer>,org.refcodes.observer.GenericEvent<RestServer>,RestResponse,org.refcodes.web.HeaderFieldsAccessor<org.refcodes.web.ResponseHeaderFields>,org.refcodes.web.HttpBodyAccessor,org.refcodes.web.HttpClientResponse,org.refcodes.web.HttpInputStreamAccessor,org.refcodes.web.HttpResponse,org.refcodes.web.HttpStatusCodeAccessor,org.refcodes.web.LocalAddressAccessor,org.refcodes.web.RemoteAddressAccessor,org.refcodes.web.UrlAccessor
public class RestResponseEvent extends RestResponseImpl implements org.refcodes.observer.GenericActionEvent<org.refcodes.web.HttpStatusCode,RestServer>, RestResponse, org.refcodes.mixin.Dumpable
Defines aRestResponseEventbeing the response as consumed by aRestResponseHandler'sRestResponseConsumer. Usually you will useRestRequestClient.onResponse(HttpMethod, String, RestResponseConsumer)or the like for registering aRestResponseConsumerto theRestClient(HttpRestClient).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A,B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.web.HeaderFieldsAccessor
org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends org.refcodes.web.HeaderFields<?,?>,B extends org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsMutator<T extends org.refcodes.web.HeaderFields<?,?>>, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsProperty<T extends org.refcodes.web.HeaderFields<?,?>>
-
Nested classes/interfaces inherited from interface org.refcodes.web.HttpBodyAccessor
org.refcodes.web.HttpBodyAccessor.HttpBodyBuilder<B extends org.refcodes.web.HttpBodyAccessor.HttpBodyBuilder<B>>, org.refcodes.web.HttpBodyAccessor.HttpBodyMutator, org.refcodes.web.HttpBodyAccessor.HttpBodyProperty, org.refcodes.web.HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.web.HttpInputStreamAccessor
org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamBuilder<B extends org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamMutator, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamProperty, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.web.HttpStatusCodeAccessor
org.refcodes.web.HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends org.refcodes.web.HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, org.refcodes.web.HttpStatusCodeAccessor.HttpStatusCodeMutator, org.refcodes.web.HttpStatusCodeAccessor.HttpStatusCodeProperty
-
Nested classes/interfaces inherited from interface org.refcodes.web.LocalAddressAccessor
org.refcodes.web.LocalAddressAccessor.LocalAddressBuilder<B extends org.refcodes.web.LocalAddressAccessor.LocalAddressBuilder<B>>, org.refcodes.web.LocalAddressAccessor.LocalAddressMutator, org.refcodes.web.LocalAddressAccessor.LocalAddressProperty
-
Nested classes/interfaces inherited from interface org.refcodes.web.RemoteAddressAccessor
org.refcodes.web.RemoteAddressAccessor.RemoteAddressBuilder<B extends org.refcodes.web.RemoteAddressAccessor.RemoteAddressBuilder<B>>, org.refcodes.web.RemoteAddressAccessor.RemoteAddressMutator, org.refcodes.web.RemoteAddressAccessor.RemoteAddressProperty
-
-
Constructor Summary
Constructors Constructor Description RestResponseEvent(RestResponse aRestResponse, RestClient aRestClient)Constructs aRestResponseEventwith all required attributes.RestResponseEvent(org.refcodes.web.Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpStatusCode aHttpStatusCode, org.refcodes.web.ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, RestClient aRestClient)Constructs aRestResponseEventwith all required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.refcodes.web.HttpStatusCodegetAction()RestServergetSource()-
Methods inherited from class org.refcodes.rest.RestResponseImpl
getLocalAddress, getRemoteAddress
-
Methods inherited from class org.refcodes.web.HttpClientResponseImpl
getHttpBody, getHttpInputStream, getResponse, getUrl, toString
-
Methods inherited from class org.refcodes.web.AbstractHttpResponse
getHeaderFields, getHttpStatusCode
-
-
-
-
Constructor Detail
-
RestResponseEvent
public RestResponseEvent(RestResponse aRestResponse, RestClient aRestClient)
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(org.refcodes.web.Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpStatusCode aHttpStatusCode, org.refcodes.web.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 Detail
-
getSource
public RestServer getSource()
- Specified by:
getSourcein interfaceorg.refcodes.mixin.SourceAccessor<RestServer>
-
getAction
public org.refcodes.web.HttpStatusCode getAction()
- Specified by:
getActionin interfaceorg.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpStatusCode>
-
-