Class ThreadService.ConfigurableRunnable

java.lang.Object
ecmwf.common.technical.ThreadService.ConfigurableRunnable
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
PluginContainer.PluginActionThread, PluginThread, PTCPReceiverThread, PTCPSenderThread, StreamPlugThread, ThreadService.ConfigurableLoopRunnable, WaitingThread, WaitingThread.AsynchronousThread, WakeupThread
Enclosing class:
ThreadService

public abstract static class ThreadService.ConfigurableRunnable extends Object implements Runnable
The Class ConfigurableRunnable.
  • Constructor Details

    • ConfigurableRunnable

      public ConfigurableRunnable()
  • Method Details

    • isStarted

      public final boolean isStarted()
      Check if the Thread has been started. Started does not mean that it is still running.
      Returns:
      true, if is started
    • execute

      public final void execute()
      Execute.
    • execute

      public final void execute(boolean interruptibleRMIThread)
      Execute.
      Parameters:
      interruptibleRMIThread - the interruptible rmi thread
    • interrupt

      public final boolean interrupt()
      Interrupt.
      Returns:
      true, if successful
    • interrupted

      public final boolean interrupted()
      Interrupted.
      Returns:
      true, if successful
    • setContextClassLoader

      public final void setContextClassLoader(ClassLoader classLoader)
      Sets the context class loader.
      Parameters:
      classLoader - the new context class loader
    • getContextClassLoader

      public final ClassLoader getContextClassLoader()
      Gets the context class loader.
      Returns:
      the context class loader
    • setPriority

      public final void setPriority(int newPriority)
      Sets the priority.
      Parameters:
      newPriority - the new priority
    • getPriority

      public final int getPriority()
      Gets the priority.
      Returns:
      the priority
    • isAlive

      public final boolean isAlive()
      Checks if is alive.
      Returns:
      true, if is alive
    • join

      public final void join() throws InterruptedException, ExecutionException, TimeoutException
      Join.
      Throws:
      InterruptedException - the interrupted exception
      ExecutionException - the execution exception
      TimeoutException - the timeout exception
    • join

      public final boolean join(long timeout) throws InterruptedException, ExecutionException, TimeoutException
      Join.
      Parameters:
      timeout - the timeout
      Returns:
      true if we had to wait for the thread
      Throws:
      InterruptedException - the interrupted exception
      ExecutionException - the execution exception
      TimeoutException - the timeout exception
    • setThreadNameAndCookie

      public final void setThreadNameAndCookie(String info, String user, String context, String address)
      Sets the thread name and cookie.
      Parameters:
      info - the info
      user - the user
      context - the context
      address - the address
    • getThreadName

      public final String getThreadName()
      Gets the thread name.
      Returns:
      the thread name
    • setInheritCookie

      public final void setInheritCookie(boolean newInheritCookie)
      Sets the inherit cookie.
      Parameters:
      newInheritCookie - the new inherit cookie
    • setForceCookie

      public final void setForceCookie(boolean forceCookie)
      Sets the force cookie.
      Parameters:
      forceCookie - the new force cookie
    • run

      public final void run()
      Run.
      Specified by:
      run in interface Runnable
    • configurableRun

      public abstract void configurableRun()
      Configurable run.