Class RestResponseImpl

  • All Implemented Interfaces:
    org.refcodes.mixin.Dumpable, 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
    Direct Known Subclasses:
    RestResponseEvent

    public class RestResponseImpl
    extends org.refcodes.web.HttpClientResponseImpl
    implements RestResponse
    Implementation of the RestResponseEvent interface as good old POJO for use by different RestClient implementations.
    • Nested Class Summary

      • 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
      • Nested classes/interfaces inherited from interface org.refcodes.web.UrlAccessor

        org.refcodes.web.UrlAccessor.UrlBuilder, org.refcodes.web.UrlAccessor.UrlMutator, org.refcodes.web.UrlAccessor.UrlProperty
    • Field Summary

      • Fields inherited from class org.refcodes.web.HttpClientResponseImpl

        _mediaTypeFactoryLookup
      • Fields inherited from class org.refcodes.web.AbstractHttpResponse

        _httpStatusCode
    • Constructor Summary

      Constructors 
      Constructor Description
      RestResponseImpl​(org.refcodes.web.Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpStatusCode aHttpStatusCode, org.refcodes.web.ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, org.refcodes.web.MediaTypeFactoryLookup aMediaTypeFactoryLookup)
      Constructs a RestResponseEvent with all required attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      InetSocketAddress getLocalAddress()
      InetSocketAddress getRemoteAddress()
      • Methods inherited from class org.refcodes.web.HttpClientResponseImpl

        getHttpBody, getHttpInputStream, getResponse, getUrl, toString
      • Methods inherited from class org.refcodes.web.AbstractHttpResponse

        getHeaderFields, getHttpStatusCode
      • Methods inherited from interface org.refcodes.mixin.Dumpable

        toDump, toDump, toPrintable
      • Methods inherited from interface org.refcodes.web.HeaderFieldsAccessor

        getHeaderFields
      • Methods inherited from interface org.refcodes.web.HttpBodyAccessor

        getHttpBody
      • Methods inherited from interface org.refcodes.web.HttpClientResponse

        getResponse, getResponse
      • Methods inherited from interface org.refcodes.web.HttpInputStreamAccessor

        getHttpInputStream
      • Methods inherited from interface org.refcodes.web.HttpStatusCodeAccessor

        getHttpStatusCode
      • Methods inherited from interface org.refcodes.web.UrlAccessor

        getUrl
    • Constructor Detail

      • RestResponseImpl

        public RestResponseImpl​(org.refcodes.web.Url aUrl,
                                InetSocketAddress aLocalAddress,
                                InetSocketAddress aRemoteAddress,
                                org.refcodes.web.HttpStatusCode aHttpStatusCode,
                                org.refcodes.web.ResponseHeaderFields aHeaderFields,
                                InputStream aHttpInputStream,
                                org.refcodes.web.MediaTypeFactoryLookup aMediaTypeFactoryLookup)
        Constructs a RestResponseEvent with 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 - The HttpStatusCode of the response.
        aHeaderFields - The ResponseHeaderFields sent by the response.
        aHttpInputStream - The InputStream representing the request's HTTP body.
        aMediaTypeFactoryLookup - The system firing the event.
    • Method Detail

      • getRemoteAddress

        public InetSocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.refcodes.web.RemoteAddressAccessor
      • getLocalAddress

        public InetSocketAddress getLocalAddress()
        Specified by:
        getLocalAddress in interface org.refcodes.web.LocalAddressAccessor