Class ReceivingService

java.lang.Object
org.freedesktop.dbus.connections.ReceivingService

public class ReceivingService extends Object
Service providing threads for every type of message expected to be received by DBus.
Version:
4.1.0 - 2022-02-02
  • Field Details

  • Constructor Details

    • ReceivingService

      ReceivingService(ReceivingServiceConfig _rsCfg)
      Creates a new instance.
      Parameters:
      _rsCfg - configuration
  • Method Details

    • execSignalHandler

      int execSignalHandler(Runnable _r)
      Execute a runnable which handles a signal.
      Parameters:
      _r - runnable
      Returns:
      retries, if any input was null -1 is returned
    • execErrorHandler

      int execErrorHandler(Runnable _r)
      Execute a runnable which handles an error.
      Parameters:
      _r - runnable
      Returns:
      retries, if any input was null -1 is returned
    • execMethodCallHandler

      int execMethodCallHandler(Runnable _r)
      Execute a runnable which handles a method call.
      Parameters:
      _r - runnable
      Returns:
      retries, if any input was null -1 is returned
    • execMethodReturnHandler

      int execMethodReturnHandler(Runnable _r)
      Execute a runnable which handles the return of a method.
      Parameters:
      _r - runnable
      Returns:
      retries, if any input was null -1 is returned
    • execOrFail

      int execOrFail(ReceivingService.ExecutorNames _executor, Runnable _r)
      Executes a runnable in a given executor. May retry execution if ExecutorService has thrown an exception and retry handler allows re-processing. When re-processing fails for 50 or more retries, an error will be logged and the runnable will not be executed.
      Parameters:
      _executor - executor to use
      _r - runnable
      Returns:
      retries, if any input was null -1 is returned
    • getExecutor

      Returns the executor or null.
      Parameters:
      _executor - executor to use
      Returns:
      executor or null
    • shutdown

      public void shutdown(int _timeout, TimeUnit _unit)
      Shutdown all executor services waiting up to the given timeout/unit.
      Parameters:
      _timeout - timeout
      _unit - time unit
    • shutdownNow

      public void shutdownNow()
      Forcefully stop the executors.