com.sas.util
Interface TimedCommandInterface

All Superinterfaces:
com.sas.util.SimpleCommand, ThreadedCommand
All Known Implementing Classes:
TimedCommand

public interface TimedCommandInterface
extends ThreadedCommand

An interface for a command which can execute under a timeout constraint. This is useful for command which might be interrupted or which may execute for a long period of time. You may wish to run such commands in a separate thread which you can interrupt.

Since:
1.2
See Also:
TimedCommand

Method Summary
 void run(java.lang.Object object)
          Run a command under a timout or interruptable contect.
 
Methods inherited from interface com.sas.util.ThreadedCommand
interrupt
 
Methods inherited from interface com.sas.util.SimpleCommand
execute
 

Method Detail

run

void run(java.lang.Object object)
         throws java.lang.InterruptedException,
                TimedOutException,
                java.lang.reflect.InvocationTargetException
Run a command under a timout or interruptable contect. This is like SimpleCommand.execute(Object) except that it provides more context to catch various types of abnormal command terminations via exceptions.

Throws:
java.lang.InterruptedException - if the command was interrupted via ThreadedCommand.interrupt()
TimedOutException - if the command did not complete normally after a specified timeout ocurred. See TimedCommand
java.lang.reflect.InvocationTargetException - if the command execution throws some other exception



Copyright © 2009 SAS Institute Inc. All Rights Reserved.