Package com.uc4.communication.requests
Class RestartTask
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.RestartTask
Restarts a task.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Restart setting of FileTransfers. -
Constructor Summary
ConstructorsConstructorDescriptionRestartTask
(int runID) Creates a newRestartTask
request to restart the task with the specified RunID.RestartTask
(int runID, UC4ObjectName queue) Creates a newRestartTask
request to restart the task with the specified RunID.RestartTask
(UC4ObjectName name, UC4ObjectName queue) Restarts a task from the object definition. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.Returns the file transfer restart setting.int
Gets the reference RunID.int
Returns the runID of the restarted task.Returns the value of the Restart Point field.protected String
getSrc()
Returns the request source.Returns theTestOptions
which are used when restarting the task ornull
if theTestOptions
are not set.protected void
handleContent
(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.boolean
boolean
boolean
void
If this method is called the detail of a task in the activity list is returned.void
If this method is called the detail of a task in the statistics is returned.void
If this method is called the detail of a task in the Explorer is returned.void
setFileTransferSetting
(RestartTask.FileTransferRestart fileTransferSetting) Sets the file transfer restart settings.void
setKeepStartType
(boolean keepStartType) Sets a flag to decide if the start type of the task should be kept when the task is restarted.void
setReferenceRunID
(int referenceRunID) Sets the reference RunID.void
setRestartAbortedChildrenOnly
(boolean restartAbortedChildrenOnly) Sets a flag to restart only aborted children.void
setRestartPoint
(String restartPoint) Sets the Restart Point on which the Job should continue.void
setTestOptions
(ExecuteTestOptions testOptions) Sets the test options when restarting this task.void
setWaitForManualRelease
(boolean waitForManualRelease) Sets a flag to let a restarted task what until it is manually released.Methods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, isAllowedInClientZero, send, setMessageBox, showQuarantineNotification
-
Constructor Details
-
RestartTask
public RestartTask(int runID) Creates a newRestartTask
request to restart the task with the specified RunID.- Parameters:
runID
- RunID of the task which should be restarted
-
RestartTask
Restarts a task from the object definition.- Parameters:
name
- Name of the object.queue
- Name of the queue
-
RestartTask
Creates a newRestartTask
request to restart the task with the specified RunID.- Parameters:
runID
- RunID of the task which should be restartedqueue
- Queue
-
-
Method Details
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Description copied from class:XMLRequest
Creates the XML Document for the request. This method is used internally.- Specified by:
createRequest
in classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
getSrc
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
handleContent
Description copied from class:XMLRequest
Sub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContent
in classXMLRequest
- Parameters:
doc
- XML Documentsession
- Info about the user session
-
getRestartedRunID
public int getRestartedRunID()Returns the runID of the restarted task.- Returns:
- RunID of the new task or
0
if not successful
-
getReferenceRunID
public int getReferenceRunID()Gets the reference RunID.- Returns:
- RunID
-
setReferenceRunID
public void setReferenceRunID(int referenceRunID) Sets the reference RunID.- Parameters:
referenceRunID
- RunID
-
getFileTransferSetting
Returns the file transfer restart setting.- Returns:
- Restart setting specific to a FileTransfer (JOBF)
-
setFileTransferSetting
Sets the file transfer restart settings. Possible values:- FileTransferRestart.ALL ... Re-transfer all files
- FileTransferRestart.FROM_LAST_POSITION ... Restart the transfer from the last position
- Parameters:
fileTransferSetting
- setting
-
getRestartPoint
Returns the value of the Restart Point field.- Returns:
- Restart Point or an empty string if the restart point has not been set.
-
setRestartPoint
Sets the Restart Point on which the Job should continue.- Parameters:
restartPoint
- Point
-
isKeepStartType
public boolean isKeepStartType()- Returns:
- Returns true if the start type should be kept
-
setKeepStartType
public void setKeepStartType(boolean keepStartType) Sets a flag to decide if the start type of the task should be kept when the task is restarted.- Parameters:
keepStartType
- True if the start type should be kept
-
isWaitForManualRelease
public boolean isWaitForManualRelease()- Returns:
- True if the task should wait for manual release
-
setWaitForManualRelease
public void setWaitForManualRelease(boolean waitForManualRelease) Sets a flag to let a restarted task what until it is manually released.- Parameters:
waitForManualRelease
- True if manual release should be enabled
-
getTestOptions
Returns theTestOptions
which are used when restarting the task ornull
if theTestOptions
are not set.- Returns:
- TestOptions
-
setTestOptions
Sets the test options when restarting this task.- Parameters:
testOptions
- TestOptions
-
isRestartAbortedChildrenOnly
public boolean isRestartAbortedChildrenOnly()- Returns:
- True if the only aborted children should be restarted
-
setRestartAbortedChildrenOnly
public void setRestartAbortedChildrenOnly(boolean restartAbortedChildrenOnly) Sets a flag to restart only aborted children.- Parameters:
restartAbortedChildrenOnly
- True if the only aborted children should be restarted
-
setActivityRestart
public void setActivityRestart()If this method is called the detail of a task in the activity list is returned. -
setArchiveRestart
public void setArchiveRestart()If this method is called the detail of a task in the statistics is returned. -
setExplorerRestart
public void setExplorerRestart()If this method is called the detail of a task in the Explorer is returned.
-