public abstract class Task<REFERENCE,USERID> extends Object implements Serializable, net.idea.restnet.i.task.ITask<REFERENCE,USERID>
Modifier and Type | Class and Description |
---|---|
static class |
Task.TaskProperty |
Modifier and Type | Field and Description |
---|---|
protected long |
completed |
protected org.restlet.resource.ResourceException |
error |
protected boolean |
internal |
protected String |
name |
protected float |
percentCompleted |
protected Exception |
policyError |
protected REFERENCE |
result |
protected long |
started |
protected net.idea.restnet.i.task.TaskStatus |
status |
protected USERID |
userid |
protected UUID |
uuid |
Modifier and Type | Method and Description |
---|---|
org.restlet.resource.ResourceException |
getError() |
String |
getName() |
abstract float |
getPercentCompleted() |
Exception |
getPolicyError() |
long |
getStarted() |
net.idea.restnet.i.task.TaskStatus |
getStatus() |
long |
getTimeCompleted() |
REFERENCE |
getUri() |
USERID |
getUserid() |
UUID |
getUuid() |
boolean |
isDone() |
boolean |
isExpired(long lifetime) |
boolean |
isInternal() |
void |
setError(org.restlet.resource.ResourceException error) |
void |
setInternal(boolean internal) |
void |
setName(String name) |
void |
setPolicy()
Does nothing so far, but should register the result URI to the policy server
|
void |
setPolicyError(Exception policyError) |
void |
setStatus(net.idea.restnet.i.task.TaskStatus status) |
void |
setTimeCompleted(long completed) |
void |
setUri(REFERENCE uri) |
void |
setUserid(USERID userid) |
void |
setUuid(UUID uuid) |
String |
toJSON() |
String |
toString() |
void |
update()
does nothing, should be autoupdated by ExecutableTask
|
protected REFERENCE result
protected String name
protected long started
protected long completed
protected boolean internal
protected float percentCompleted
protected USERID userid
protected UUID uuid
protected org.restlet.resource.ResourceException error
protected Exception policyError
protected net.idea.restnet.i.task.TaskStatus status
public Task(USERID user)
public boolean isInternal()
public void setInternal(boolean internal)
public long getTimeCompleted()
public void setTimeCompleted(long completed)
public Exception getPolicyError()
public void setPolicyError(Exception policyError)
public void setError(org.restlet.resource.ResourceException error)
public org.restlet.resource.ResourceException getError()
public void setStatus(net.idea.restnet.i.task.TaskStatus status)
public UUID getUuid()
public void setUuid(UUID uuid)
public USERID getUserid()
public void setUserid(USERID userid)
public boolean isExpired(long lifetime)
public net.idea.restnet.i.task.TaskStatus getStatus()
public abstract float getPercentCompleted()
public long getStarted()
public String getName()
public void setName(String name)
public REFERENCE getUri()
public void setUri(REFERENCE uri)
public boolean isDone()
public void update()
public void setPolicy() throws Exception
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.