Class LocalURLFetchService

java.lang.Object
com.google.appengine.tools.development.AbstractLocalRpcService
com.google.appengine.api.urlfetch.dev.LocalURLFetchService
All Implemented Interfaces:
LocalRpcService

@AutoService(LocalRpcService.class) public class LocalURLFetchService extends AbstractLocalRpcService
LocalURLFetchService fetches URLs using Apache HttpClient. This implementation should only be used within the dev appserver environment.
  • Field Details

  • Constructor Details

    • LocalURLFetchService

      public LocalURLFetchService()
  • Method Details

    • getPackage

      public String getPackage()
      Description copied from interface: LocalRpcService
      Returns the package for the service, for example, "datastore_v3".
      Returns:
      a not null package name.
    • setTimeoutInMs

      public void setTimeoutInMs(int timeoutInMs)
    • createHttpClient

      public org.apache.http.client.HttpClient createHttpClient(boolean validateHttps)
    • init

      public void init(LocalServiceContext context, Map<String,String> properties)
      Description copied from interface: LocalRpcService
      Initializes the service with a set of configuration properties. Must be called before a service is started.
      Specified by:
      init in interface LocalRpcService
      Overrides:
      init in class AbstractLocalRpcService
      Parameters:
      context - A context object for the application
      properties - A read-only Map of properties.
    • start

      public void start()
      Description copied from interface: LocalRpcService
      Puts a new service into "serving" mode. Aside from setting properties, the service is not functional until after having been started.
      Specified by:
      start in interface LocalRpcService
      Overrides:
      start in class AbstractLocalRpcService
    • stop

      public void stop()
      Description copied from interface: LocalRpcService
      Stops the service, releasing all of its resources.
      Specified by:
      stop in interface LocalRpcService
      Overrides:
      stop in class AbstractLocalRpcService
    • fetch

      public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse fetch(LocalRpcService.Status status, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest request)
    • getMaximumDeadline

      public Double getMaximumDeadline(boolean isOfflineRequest)
      Description copied from interface: LocalRpcService
      Return the maximum number of seconds that is allowed as a deadline for each API call. The user cannot request a deadline higher than this value. This method may return null if the service has no opinion about the maximum deadline, in which case a global maximum deadline will be used instead.
      Specified by:
      getMaximumDeadline in interface LocalRpcService
      Overrides:
      getMaximumDeadline in class AbstractLocalRpcService
    • getMaxApiRequestSize

      public Integer getMaxApiRequestSize()
      Description copied from interface: LocalRpcService
      Returns the maximum size of an encoded API request in bytes, or null for the default size.
      Specified by:
      getMaxApiRequestSize in interface LocalRpcService
      Overrides:
      getMaxApiRequestSize in class AbstractLocalRpcService