Class RequesterSingletonFactory


  • public final class RequesterSingletonFactory
    extends Object

    Factory for returning singleton requesters. The regular RequesterFactory is recommended instead of this class; this class should only be used if you really need a singleton.

    Since:
    1.2.0
    • Method Detail

      • getRequester

        public static AbstractRequester getRequester​(HttpRequestMethod method)

        Returns a singleton requester which matches the method. All requests are routed to match the FALLBACK_LOCALE and responses are read as UTF-8 character encoding.

        Parameters:
        method - the method (i.e. GET or POST)
        Returns:
        a singleton requester which matches the method.
      • getRequester

        public static AbstractRequester getRequester​(HttpRequestMethod method,
                                                     Charset charset)

        Returns a singleton requester which matches the method. All responses are read as to match the character encoding.

        Parameters:
        method - the method (i.e. GET or POST)
        charset - the character encoding to use
        Returns:
        a singleton requester which matches the method.