Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WorkExecutor |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: WorkExecutor.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | /** | |
12 | * | |
13 | * Copyright 2004 The Apache Software Foundation | |
14 | * | |
15 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
16 | * you may not use this file except in compliance with the License. | |
17 | * You may obtain a copy of the License at | |
18 | * | |
19 | * http://www.apache.org/licenses/LICENSE-2.0 | |
20 | * | |
21 | * Unless required by applicable law or agreed to in writing, software | |
22 | * distributed under the License is distributed on an "AS IS" BASIS, | |
23 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
24 | * See the License for the specific language governing permissions and | |
25 | * limitations under the License. | |
26 | */ | |
27 | ||
28 | package org.mule.impl.work; | |
29 | ||
30 | import javax.resource.spi.work.WorkException; | |
31 | ||
32 | import edu.emory.mathcs.backport.java.util.concurrent.Executor; | |
33 | ||
34 | /** | |
35 | * <code>WorkExecutor</code> TODO | |
36 | */ | |
37 | public interface WorkExecutor | |
38 | { | |
39 | ||
40 | /** | |
41 | * This method must be implemented by sub-classes in order to provide the | |
42 | * relevant synchronization policy. It is called by the executeWork template | |
43 | * method. | |
44 | * | |
45 | * @param work Work to be executed. | |
46 | * @throws javax.resource.spi.work.WorkException Indicates that the work has | |
47 | * failed. | |
48 | * @throws InterruptedException Indicates that the thread in charge of the | |
49 | * execution of the specified work has been interrupted. | |
50 | */ | |
51 | void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException; | |
52 | ||
53 | } |