Class ReceivingService


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

      • ReceivingService

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

      • execSignalHandler

        int execSignalHandler​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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,
                       java.lang.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

        java.util.concurrent.ExecutorService getExecutor​(ReceivingService.ExecutorNames _executor)
        Returns the executor or null.
        Parameters:
        _executor - executor to use
        Returns:
        executor or null
      • shutdown

        public void shutdown​(int _timeout,
                             java.util.concurrent.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.