
org.dihedron.patterns.concurrent.Task Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dihedron-patterns Show documentation
Show all versions of dihedron-patterns Show documentation
b Library of more complex base functionalities (micro-patterns).
The newest version!
/**
* Copyright (c) 2012-2014, Andrea Funto'. All rights reserved.
*
* This file is part of the Dihedron Common Utilities library ("Commons").
*
* "Commons" is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* "Commons" is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with "Commons". If not, see .
*/
package org.dihedron.patterns.concurrent;
/**
* The interface all tasks must implement in order to be executed asynchronously.
*
* @author Andrea Funto'
*/
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