Class ResponseConversionFunctionFactoryV2


  • public class ResponseConversionFunctionFactoryV2
    extends Object
    Factory class to create the appropriate type of Function to convert a REST Response into its final form.
    • Constructor Detail

      • ResponseConversionFunctionFactoryV2

        public ResponseConversionFunctionFactoryV2()
    • Method Detail

      • create

        public Function<javax.ws.rs.core.Response,​WithHeaders<Void>> create()
        Creates a Function that will not convert the Response into any given type, just return the headers.
        Returns:
        A new Function.
      • create

        public Function<javax.ws.rs.core.Response,​WithHeaders<Void>> create​(ServiceDetails serviceDetails)
        Creates a Function that will not convert the Response into any given type, just return the headers.
        Parameters:
        serviceDetails - service details of the Response
        Returns:
        A new Function.
      • create

        public <T> Function<javax.ws.rs.core.Response,​WithHeaders<T>> create​(Class<T> clazz)
        Creates a Function that will convert the Response into the given object type.
        Parameters:
        clazz - The type of instance to convert to.
        Returns:
        A new Function.
      • create

        public <T> Function<javax.ws.rs.core.Response,​WithHeaders<T>> create​(Class<T> clazz,
                                                                                   ServiceDetails serviceDetails)
        Creates a Function that will convert the Response into the given object type.
        Parameters:
        clazz - The type of instance to convert to.
        serviceDetails - service details of the Response
        Returns:
        A new Function.
      • create

        public <T> Function<javax.ws.rs.core.Response,​WithHeaders<T>> create​(javax.ws.rs.core.GenericType<T> type)
        Creates a Function that will convert the Response into a parameterized collection object, or some other parameterized type.
        Parameters:
        type - The generic type to convert to.
        Returns:
        A new Function.
      • create

        public <T> Function<javax.ws.rs.core.Response,​WithHeaders<T>> create​(javax.ws.rs.core.GenericType<T> type,
                                                                                   ServiceDetails serviceDetails)
        Creates a Function that will convert the Response into a parameterized collection object, or some other parameterized type.
        Parameters:
        type - The generic type to convert to.
        serviceDetails - service details of the Response
        Returns:
        A new Function.