| Modifier and Type | Class and Description |
|---|---|
class |
ActionHandler.HeartbeatTask |
| Modifier and Type | Field and Description |
|---|---|
protected ActionManagerIF |
actionManager |
protected CacheIF |
cache |
protected org.dmd.util.BooleanVar |
cancelled |
static long |
DEFAULT_HEARTBEAT_MS |
protected org.slf4j.Logger |
logger |
protected org.dmd.dmp.server.extended.ActionRequest |
request |
protected Integer |
serverActionID |
| Constructor and Description |
|---|
ActionHandler(Integer serverActionID,
org.dmd.dmp.server.extended.ActionRequest request,
ActionManagerIF actionManager,
CacheIF cache,
RequestTrackerIF requestTracker) |
| Modifier and Type | Method and Description |
|---|---|
ActionManagerIF |
actionManager() |
void |
cancel()
We set the cancelled flag to true.
|
boolean |
cancelled() |
abstract org.dmd.dmp.server.extended.ActionResponse |
canProceed()
Derived implementations should overload this method to validate the parameters
to the action or perform any other contextual checks to see if the action can
proceed.
|
protected long |
lastResponseTime() |
protected void |
lastResponseTime(long time) |
org.dmd.dmp.server.extended.ActionRequest |
request() |
protected void |
sendError(String message)
This method sends an ActionResponse of type ERROR and sets it to be the last response.
|
protected void |
sendProgressObject(org.dmd.dmc.DmcObject object)
Sends a PROGRESSOBJECTS message with a single object.
|
protected void |
sendProgressObjects(ArrayList<org.dmd.dmc.DmcObject> objects)
Sends a PROGRESSOBJECTS message with multiple objects.
|
protected void |
sendProgressText(String message)
Sends a PROGRESSTEXT message.
|
protected void |
sendResponse(org.dmd.dmp.server.extended.ActionResponse response)
Call this to send associated responses back to the client.
|
Integer |
serverActionID() |
public static final long DEFAULT_HEARTBEAT_MS
protected org.dmd.dmp.server.extended.ActionRequest request
protected ActionManagerIF actionManager
protected CacheIF cache
protected final Integer serverActionID
protected volatile org.dmd.util.BooleanVar cancelled
protected org.slf4j.Logger logger
public ActionHandler(Integer serverActionID, org.dmd.dmp.server.extended.ActionRequest request, ActionManagerIF actionManager, CacheIF cache, RequestTrackerIF requestTracker)
public ActionManagerIF actionManager()
public org.dmd.dmp.server.extended.ActionRequest request()
public Integer serverActionID()
public void cancel()
public boolean cancelled()
protected void sendResponse(org.dmd.dmp.server.extended.ActionResponse response)
response - the response to be sent.protected long lastResponseTime()
protected void lastResponseTime(long time)
public abstract org.dmd.dmp.server.extended.ActionResponse canProceed()
protected void sendProgressObject(org.dmd.dmc.DmcObject object)
objects - the objects to be sentprotected void sendProgressObjects(ArrayList<org.dmd.dmc.DmcObject> objects)
objects - the objects to be sentprotected void sendProgressText(String message)
message - the progress message.protected void sendError(String message)
message - the error message.Copyright © 2019. All rights reserved.