Class DefaultRequestProvider

  • All Implemented Interfaces:
    RequestProvider

    public class DefaultRequestProvider
    extends java.lang.Object
    implements RequestProvider
    The default implementation of an oembed provider. Creates plain GET requests.
    Author:
    Michael J. Simons, 2014-12-31
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOGGER  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.http.client.methods.HttpGet createRequestFor​(java.lang.String userAgent, java.lang.String applicationName, java.net.URI uri)
      Must return an HTTP-Request against the given URL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        public static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • DefaultRequestProvider

        public DefaultRequestProvider()
    • Method Detail

      • createRequestFor

        public org.apache.http.client.methods.HttpGet createRequestFor​(java.lang.String userAgent,
                                                                       java.lang.String applicationName,
                                                                       java.net.URI uri)
        Must return an HTTP-Request against the given URL.
        Specified by:
        createRequestFor in interface RequestProvider
        Parameters:
        userAgent - Our user agent
        applicationName - An optional application name, will be added to the userAgent if present
        uri - The api url of the oembed endpoint
        Returns:
        A prepared HTTP-Request