Class RestResponseImpl

  • All Implemented Interfaces:
    org.refcodes.mixin.Dumpable, org.refcodes.net.HeaderFieldsAccessor<org.refcodes.net.ResponseHeaderFields>, org.refcodes.net.HttpBodyAccessor, org.refcodes.net.HttpClientResponse, org.refcodes.net.HttpInputStreamAccessor, org.refcodes.net.HttpResponse, org.refcodes.net.HttpStatusCodeAccessor, org.refcodes.net.LocalAddressAccessor, org.refcodes.net.RemoteAddressAccessor, org.refcodes.net.UrlAccessor, RestResponse
    Direct Known Subclasses:
    RestResponseEventImpl


    public class RestResponseImpl
    extends org.refcodes.net.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.net.HeaderFieldsAccessor

        org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends org.refcodes.net.HeaderFields<?,?>,B extends org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsMutator<T extends org.refcodes.net.HeaderFields<?,?>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsProperty<T extends org.refcodes.net.HeaderFields<?,?>>
      • Nested classes/interfaces inherited from interface org.refcodes.net.HttpBodyAccessor

        org.refcodes.net.HttpBodyAccessor.HttpBodyBuilder<B extends org.refcodes.net.HttpBodyAccessor.HttpBodyBuilder<B>>, org.refcodes.net.HttpBodyAccessor.HttpBodyMutator, org.refcodes.net.HttpBodyAccessor.HttpBodyProperty, org.refcodes.net.HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
      • Nested classes/interfaces inherited from interface org.refcodes.net.HttpInputStreamAccessor

        org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamBuilder<B extends org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamMutator, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamProperty, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends Exception>
      • Nested classes/interfaces inherited from interface org.refcodes.net.HttpStatusCodeAccessor

        org.refcodes.net.HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends org.refcodes.net.HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, org.refcodes.net.HttpStatusCodeAccessor.HttpStatusCodeMutator, org.refcodes.net.HttpStatusCodeAccessor.HttpStatusCodeProperty
      • Nested classes/interfaces inherited from interface org.refcodes.net.LocalAddressAccessor

        org.refcodes.net.LocalAddressAccessor.LocalAddressBuilder<B extends org.refcodes.net.LocalAddressAccessor.LocalAddressBuilder<B>>, org.refcodes.net.LocalAddressAccessor.LocalAddressMutator, org.refcodes.net.LocalAddressAccessor.LocalAddressProperty
      • Nested classes/interfaces inherited from interface org.refcodes.net.RemoteAddressAccessor

        org.refcodes.net.RemoteAddressAccessor.RemoteAddressBuilder<B extends org.refcodes.net.RemoteAddressAccessor.RemoteAddressBuilder<B>>, org.refcodes.net.RemoteAddressAccessor.RemoteAddressMutator, org.refcodes.net.RemoteAddressAccessor.RemoteAddressProperty
      • Nested classes/interfaces inherited from interface org.refcodes.net.UrlAccessor

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

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

        _mediaTypeFactoryLookup
      • Fields inherited from class org.refcodes.net.HttpResponseImpl

        _httpStatusCode
    • Constructor Summary

      Constructors 
      Constructor Description
      RestResponseImpl​(org.refcodes.net.Url aUrl, InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.net.HttpStatusCode aHttpStatusCode, org.refcodes.net.ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, org.refcodes.net.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 interface org.refcodes.mixin.Dumpable

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

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

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

        getResponse, getResponse
      • Methods inherited from class org.refcodes.net.HttpClientResponseImpl

        getHttpBody, getHttpInputStream, getResponse, getUrl, toString
      • Methods inherited from interface org.refcodes.net.HttpInputStreamAccessor

        getHttpInputStream
      • Methods inherited from class org.refcodes.net.HttpResponseImpl

        getHeaderFields, getHttpStatusCode
      • Methods inherited from interface org.refcodes.net.HttpStatusCodeAccessor

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

        getUrl
    • Constructor Detail

      • RestResponseImpl

        public RestResponseImpl​(org.refcodes.net.Url aUrl,
                                InetSocketAddress aLocalAddress,
                                InetSocketAddress aRemoteAddress,
                                org.refcodes.net.HttpStatusCode aHttpStatusCode,
                                org.refcodes.net.ResponseHeaderFields aHeaderFields,
                                InputStream aHttpInputStream,
                                org.refcodes.net.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.net.RemoteAddressAccessor
      • getLocalAddress

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