Class ServerStateOperation

java.lang.Object
org.openscada.opc.lib.da.ServerStateOperation
All Implemented Interfaces:
Runnable

public class ServerStateOperation extends Object implements Runnable
A server state operation which can be interruped
Author:
Jens Reimann
  • Field Details

  • Constructor Details

    • ServerStateOperation

      public ServerStateOperation(OPCServer server)
  • Method Details

    • run

      public void run()
      Perform the operation.

      This method will block until either the serve state has been aquired or the timeout triggers cancels the call.

      Specified by:
      run in interface Runnable
    • getServerState

      public OPCSERVERSTATUS getServerState(int timeout) throws Throwable
      Get the server state with a timeout.
      Parameters:
      timeout - the timeout in ms
      Returns:
      the server state or null if the server is not set.
      Throws:
      Throwable - any error that occurred