org.openrdf.http.object.tasks
Class Task
java.lang.Object
org.openrdf.http.object.tasks.Task
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- ProcessTask, TriageTask, VerifyTask
public abstract class Task
- extends Object
- implements Runnable
A step for handling a request that can be performed in isolation.
- Author:
- James Leigh
Task
public Task(Request request,
Filter filter)
isStorable
public final boolean isStorable()
isSafe
public final boolean isSafe()
getReceivedOn
public final long getReceivedOn()
setTrigger
public void setTrigger(org.apache.http.nio.protocol.NHttpResponseTrigger trigger)
run
public void run()
- Specified by:
run in interface Runnable
getGeneration
public abstract int getGeneration()
bear
public <T extends Task> T bear(T child)
go
public void go(Executor executor)
isDone
public boolean isDone()
awaitVerification
public void awaitVerification(long time,
TimeUnit unit)
throws InterruptedException
- Throws:
InterruptedException
abort
public void abort()
close
public void close()
onDone
public void onDone(Runnable onDone)
getHttpResponse
public org.apache.http.HttpResponse getHttpResponse()
throws org.apache.http.HttpException,
IOException
- Throws:
org.apache.http.HttpException
IOException
submitResponse
public void submitResponse(Response resp)
throws Exception
- Throws:
Exception
submitResponse
public void submitResponse(org.apache.http.HttpResponse response)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.