
org.dihedron.patterns.concurrent.Task Maven / Gradle / Ivy
/**
* Copyright (c) 2012-2014, Andrea Funto'. All rights reserved. See LICENSE for details.
*/
package org.dihedron.patterns.concurrent;
import org.dihedron.core.License;
/**
* The interface all tasks must implement in order to be executed asynchronously.
*
* @author Andrea Funto'
*/
@License
public interface Task {
/**
* The actual business logic method: the code in this method will be
* executed asynchronously in a thread pool. This object will be available
* to task observers.
*
* @return
* a return value.
* @throws Exception
*/
T execute() throws TaskException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy