Class ThreadPoolTaskExecutorPingTest

java.lang.Object
net.solarnetwork.central.scheduler.ThreadPoolTaskExecutorPingTest
All Implemented Interfaces:
net.solarnetwork.service.PingTest

public class ThreadPoolTaskExecutorPingTest extends Object implements net.solarnetwork.service.PingTest
PingTest for monitoring a thread pool executor.
  • Constructor Details

    • ThreadPoolTaskExecutorPingTest

      public ThreadPoolTaskExecutorPingTest(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
      Constructor.

      The ID will be set to this class' name, plus the executor's thread name prefix if available.

      Parameters:
      executor - the executor to monitor
    • ThreadPoolTaskExecutorPingTest

      public ThreadPoolTaskExecutorPingTest(String id, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
      Constructor.
      Parameters:
      id - the ping test ID
      executor - the executor to monitor
  • Method Details

    • getPingTestId

      public String getPingTestId()
      Specified by:
      getPingTestId in interface net.solarnetwork.service.PingTest
    • getPingTestName

      public String getPingTestName()
      Specified by:
      getPingTestName in interface net.solarnetwork.service.PingTest
    • getPingTestMaximumExecutionMilliseconds

      public long getPingTestMaximumExecutionMilliseconds()
      Specified by:
      getPingTestMaximumExecutionMilliseconds in interface net.solarnetwork.service.PingTest
    • performPingTest

      public net.solarnetwork.service.PingTest.Result performPingTest() throws Exception
      Specified by:
      performPingTest in interface net.solarnetwork.service.PingTest
      Throws:
      Exception