Class Timeout

java.lang.Object
org.netbeans.jemmy.Timeout

public class Timeout extends Object
Represents one timeout.
Author:
Alexandre Iline (alexandre.iline@sun.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Timeout(String name, long value)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Throws a TimeoutExpiredException exception if timeout has been expired.
    boolean
    Checks if timeout has been expired after start() invocation.
    Returns timeout name.
    long
    Returns timeout value.
    void
    Sleeps for timeout value.
    void
    Starts timeout measuring.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Timeout

      public Timeout(String name, long value)
      Constructor.
      Parameters:
      name - Timeout name.
      value - Timeout value in milliseconds.
  • Method Details

    • getName

      public String getName()
      Returns timeout name.
      Returns:
      timeout name.
    • getValue

      public long getValue()
      Returns timeout value.
      Returns:
      timeout value.
    • sleep

      public void sleep()
      Sleeps for timeout value.
    • start

      public void start()
      Starts timeout measuring.
    • expired

      public boolean expired()
      Checks if timeout has been expired after start() invocation.
      Returns:
      true if timeout has been expired.
    • check

      public void check()
      Throws a TimeoutExpiredException exception if timeout has been expired.
      Throws:
      TimeoutExpiredException - if timeout has been expired after start() invocation.