public abstract class AbstractActionableResource<R extends BaseResource> extends AbstractUpdatableResource<R>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractActionableResource.AbstractActionTask |
protected static class |
AbstractActionableResource.DoNothingTask |
protected static class |
AbstractActionableResource.SimpleExecutor
Fallback executor, starts a new thread for each task.
|
Modifier and Type | Field and Description |
---|---|
protected ReapedMap<String,ActionResource> |
actions |
protected Executor |
executor |
protected UriInfoProvider |
uriProvider |
model, OBJECT_FACTORY, STRICTLY_IMMUTABLE
Constructor and Description |
---|
AbstractActionableResource(String id) |
AbstractActionableResource(String id,
Executor executor) |
AbstractActionableResource(String id,
Executor executor,
UriInfoProvider uriProvider) |
Modifier and Type | Method and Description |
---|---|
protected javax.ws.rs.core.Response |
doAction(javax.ws.rs.core.UriInfo uriInfo,
AbstractActionableResource.AbstractActionTask task)
Perform an action, managing asynchrony and returning an appropriate
response.
|
ActionResource |
getActionSubresource(String action,
String oid) |
Executor |
getExecutor() |
protected R |
getModel() |
protected javax.ws.rs.core.UriInfo |
getUriInfo() |
UriInfoProvider |
getUriProvider() |
void |
setExecutor(Executor executor) |
addStrictlyImmutable, getId, getStrictlyImmutable, newModel, refresh, setId, validateUpdate
protected Executor executor
protected ReapedMap<String,ActionResource> actions
protected UriInfoProvider uriProvider
public AbstractActionableResource(String id)
public AbstractActionableResource(String id, Executor executor, UriInfoProvider uriProvider)
protected javax.ws.rs.core.UriInfo getUriInfo()
public UriInfoProvider getUriProvider()
protected R getModel()
protected javax.ws.rs.core.Response doAction(javax.ws.rs.core.UriInfo uriInfo, AbstractActionableResource.AbstractActionTask task)
uriInfo
- wraps the URI for the current requestaction
- represents the pending actiontask
- fulfils the actionpublic ActionResource getActionSubresource(String action, String oid)
public Executor getExecutor()
public void setExecutor(Executor executor)
Copyright © 2012. All Rights Reserved.