flex.messaging.util.concurrent
Interface Executor

All Known Implementing Classes:
AsynchBeansWorkManagerExecutor

public interface Executor

This interface allows different Executor implementations to be chosen and used without creating a direct dependency upon java.util.concurrent.Executor added in Java 1.5, the Java 1.4.x-friendly backport of the java.util.concurrent APIs which has a different package structure, or alternative work execution frameworks such as IBM WebSphere 5's com.ibm.websphere.asynchbeans.WorkManager or the commonj.work.WorkManager available in IBM WebSphere 6, BEA WebLogic 9 or other application servers that support the commonj API. Implementations should notify clients of any failure with executing a command by invoking the callback on the FailedExecutionHandler if one has been set.

See Also:
Executor

Method Summary
 void execute(Runnable command)
          Executes the given command at some time in the future.
 FailedExecutionHandler getFailedExecutionHandler()
          Returns the current handler for failed executions.
 void setFailedExecutionHandler(FailedExecutionHandler handler)
          Sets the handler for failed executions.
 

Method Detail

execute

void execute(Runnable command)
Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation. Implementation classes are free to throw a RuntimeException if the command can not be executed.


getFailedExecutionHandler

FailedExecutionHandler getFailedExecutionHandler()
Returns the current handler for failed executions.

Returns:
The current handler.

setFailedExecutionHandler

void setFailedExecutionHandler(FailedExecutionHandler handler)
Sets the handler for failed executions.

Parameters:
handler - The new handler.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/util/concurrent/Executor.html