1 package fr.in2p3.jsaga.impl.task;
2
3 import org.ogf.saga.attributes.Attributes;
4 import org.ogf.saga.error.*;
5 import org.ogf.saga.session.Session;
6 import org.ogf.saga.task.*;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public abstract class AbstractAsyncTaskImpl<A extends Attributes> extends AbstractTaskImplWithAsyncAttributes<Void,Void,A> {
21
22 protected AbstractAsyncTaskImpl(Session session, boolean create) throws NotImplementedException {
23 super(session, create);
24 }
25
26 public Task<Task,Void> run(TaskMode mode) throws NotImplementedException {
27 return new AbstractThreadedTask<Task,Void>(mode) {
28 public Void invoke() throws NotImplementedException, IncorrectURLException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, AlreadyExistsException, DoesNotExistException, TimeoutException, NoSuccessException {
29 AbstractAsyncTaskImpl.super.run();
30 return null;
31 }
32 };
33 }
34
35 public Task<Task,Void> cancel(TaskMode mode) throws NotImplementedException {
36 return new AbstractThreadedTask<Task,Void>(mode) {
37 public Void invoke() throws NotImplementedException, IncorrectURLException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, AlreadyExistsException, DoesNotExistException, TimeoutException, NoSuccessException {
38 AbstractAsyncTaskImpl.super.cancel();
39 return null;
40 }
41 };
42 }
43
44 public Task<Task,State> getState(TaskMode mode) throws NotImplementedException {
45 return new AbstractThreadedTask<Task,State>(mode) {
46 public State invoke() throws NotImplementedException, IncorrectURLException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, BadParameterException, IncorrectStateException, AlreadyExistsException, DoesNotExistException, TimeoutException, NoSuccessException {
47 return AbstractAsyncTaskImpl.super.getState();
48 }
49 };
50 }
51 }