Interface ApiProxyLocal

All Superinterfaces:
com.google.apphosting.api.ApiProxy.Delegate<com.google.apphosting.api.ApiProxy.Environment>
All Known Implementing Classes:
ApiProxyLocalImpl

public interface ApiProxyLocal extends com.google.apphosting.api.ApiProxy.Delegate<com.google.apphosting.api.ApiProxy.Environment>
A local service object, suitable for testing of service-client code as well as for local runtime use in dev_appserver.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends the given service properties to properties.
    com.google.appengine.tools.development.Clock
     
    Get the LocalRpcService identified by the given package.
    void
    setClock(com.google.appengine.tools.development.Clock clock)
    Sets the clock with which all local services are initialized.
    void
    Resets the service properties to properties.
    void
    setProperty(String property, String value)
    Sets an individual service property.
    void
    Stops all services started by this ApiProxy and releases all of its resources.

    Methods inherited from interface com.google.apphosting.api.ApiProxy.Delegate

    flushLogs, getRequestThreads, log, makeAsyncCall, makeSyncCall
  • Method Details

    • setProperty

      void setProperty(String property, String value)
      Sets an individual service property.
      Parameters:
      property - name of the property to set
      value - new value of the property
    • setProperties

      void setProperties(Map<String,String> properties)
      Resets the service properties to properties.
      Parameters:
      properties - a maybe null set of properties for local services.
    • appendProperties

      void appendProperties(Map<String,String> properties)
      Appends the given service properties to properties.
      Parameters:
      properties - a set of properties to append for local services.
    • stop

      void stop()
      Stops all services started by this ApiProxy and releases all of its resources.
    • getService

      LocalRpcService getService(String pkg)
      Get the LocalRpcService identified by the given package. This method should really only be used by tests.
      Parameters:
      pkg - The package identifying the service we want.
      Returns:
      The requested service, or null if no service identified by the given package is available.
    • getClock

      com.google.appengine.tools.development.Clock getClock()
      Returns:
      The clock with which all local services are initialized. Local services use the clock to determine the current time.
    • setClock

      void setClock(com.google.appengine.tools.development.Clock clock)
      Sets the clock with which all local services are initialized. Local services use the clock to determine the current time. Note that calling this method after a local service has already initialized will have no effect.
      Parameters:
      clock -