Class DefaultRuntimeArgsService

java.lang.Object
com.gluonhq.attach.runtimeargs.impl.DefaultRuntimeArgsService
All Implemented Interfaces:
RuntimeArgsService
Direct Known Subclasses:
AndroidRuntimeArgsService, DesktopRuntimeArgsService, IOSRuntimeArgsService

public class DefaultRuntimeArgsService extends Object implements RuntimeArgsService
  • Constructor Details

    • DefaultRuntimeArgsService

      public DefaultRuntimeArgsService()
  • Method Details

    • fire

      public void fire(String key, String value)
      Description copied from interface: RuntimeArgsService
      When the app is launched externally, this method is called to identify the key based on the service that is responsible, and the value associated to this key. Typically the developer won't need to call this method for certain services that will launch the app from a Local Notifications or a custom URL.
      Specified by:
      fire in interface RuntimeArgsService
      Parameters:
      key - a String that the service is expected to receive
      value - a String that the service will process when the key is received
    • addListener

      public void addListener(String key, Consumer<String> consumer)
      Description copied from interface: RuntimeArgsService
      Adds a listener to the given key, like RuntimeArgsService.LAUNCH_LOCAL_NOTIFICATION_KEY or RuntimeArgsService.LAUNCH_URL_KEY, so if those occur, the consumer will accept the provided String
      Specified by:
      addListener in interface RuntimeArgsService
      Parameters:
      key - a String that the service is expected to receive
      consumer - the operation that will be accepted
    • removeListener

      public void removeListener(String key)
      Description copied from interface: RuntimeArgsService
      Removes the listener for the given key
      Specified by:
      removeListener in interface RuntimeArgsService
      Parameters:
      key - a String that the service is expected to receive