类 DefaultExecuteResultHandler

java.lang.Object
com.sh.common.exec.DefaultExecuteResultHandler
所有已实现的接口:
ExecuteResultHandler

public class DefaultExecuteResultHandler extends Object implements ExecuteResultHandler
Description: Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
  • 构造器详细资料

    • DefaultExecuteResultHandler

      public DefaultExecuteResultHandler()
      Constructor.
  • 方法详细资料

    • onProcessComplete

      public void onProcessComplete(int exitValue)
      从接口复制的说明: ExecuteResultHandler
      The asynchronous execution completed.
      指定者:
      onProcessComplete 在接口中 ExecuteResultHandler
      参数:
      exitValue - the exit value of the sub-process
      另请参阅:
    • onProcessFailed

      public void onProcessFailed(ExecuteException e)
      从接口复制的说明: ExecuteResultHandler
      The asynchronous execution failed.
      指定者:
      onProcessFailed 在接口中 ExecuteResultHandler
      参数:
      e - the ExecuteException containing the root cause
      另请参阅:
    • getException

      public ExecuteException getException()
      Get the exception causing the process execution to fail.
      返回:
      Returns the exception.
      抛出:
      IllegalStateException - if the process has not exited yet
    • getExitValue

      public int getExitValue()
      Get the exitValue of the process.
      返回:
      Returns the exitValue.
      抛出:
      IllegalStateException - if the process has not exited yet
    • hasResult

      public boolean hasResult()
      Has the process exited and a result is available, i.e. exitCode or exception?
      返回:
      true if a result of the execution is available
    • waitFor

      public void waitFor() throws InterruptedException
      Causes the current thread to wait, if necessary, until the process has terminated. This method returns immediately if the process has already terminated. If the process has not yet terminated, the calling thread will be blocked until the process exits.
      抛出:
      InterruptedException - if the current thread is interrupted by another thread while it is waiting, then the wait is ended and an InterruptedException is thrown.
    • waitFor

      public void waitFor(long timeout) throws InterruptedException
      Causes the current thread to wait, if necessary, until the process has terminated. This method returns immediately if the process has already terminated. If the process has not yet terminated, the calling thread will be blocked until the process exits.
      参数:
      timeout - the maximum time to wait in milliseconds
      抛出:
      InterruptedException - if the current thread is interrupted by another thread while it is waiting, then the wait is ended and an InterruptedException is thrown.