public class SplusDataResult
extends java.lang.Object
implements java.io.Serializable
When you send an expression or a function request to Spotfire Statistics Services, you can send it synchronously or asynchronously, or you can schedule it to run at a specified time.
Constructor and Description |
---|
SplusDataResult()
The default constructor.
|
SplusDataResult(int errorCode,
java.lang.String errorMessage) |
Modifier and Type | Method and Description |
---|---|
<T extends SplusObject> |
extractReturnValue(int index)
Helper method to extract the return value of the job.
|
java.lang.String |
getCode()
Retrieves the expression that produces the evaluation result.
|
java.lang.String |
getCreated()
Retrieves the date and time that the request was created as a String.
|
java.lang.String |
getCreatedBy()
Retrieves the ID of the user who created the request.
|
long |
getCreatedMillis()
Gets the date and time that the request was created in milliseconds.
|
java.util.Date |
getCreatedTime()
Retrieves the date and time that the request was created as a
Date object. |
long |
getEngineTime()
Retrieves the time spent in the engine while processing the request.
|
java.lang.String |
getError()
Retrieves any errors that resulted from the request.
|
int |
getErrorCode()
Retrieves the error code that details specific error condition occurred.
|
java.lang.Boolean |
getHasError()
Internal method.
|
java.lang.Boolean |
getHasReturnValue()
Internal method.
|
java.lang.Boolean |
getHasTextOutput()
Internal method.
|
java.lang.Boolean |
getHasWarnings()
Internal method.
|
java.lang.String |
getIntStatus()
Internal method.
|
java.lang.String |
getJobId()
Retrieves a job ID associated with the evaluation.
|
long |
getPrepTime()
Retrieves the time spent preparing the engine to execute the request (included in engineTime).
|
long |
getQueuedTime()
Retrieves the time this request spent in the queue.
|
java.lang.String |
getResultsDir()
Retrieves a string containing the path of the directory where any file output is stored.
|
SplusReturnValue |
getReturnValue()
Retrieves the
SplusReturnValue object containing the results of
the evaluation. |
byte[] |
getReturnValueAsByteArray()
Utility method to retrieve binary representation of the return value as a byte array.
|
ValueRepresentation |
getReturnValueRepresentation()
Gets the return value representation object.
|
java.lang.String |
getScheduled()
Retrieves the date and time that the request was scheduled to run.
|
long |
getScheduledMillis()
Gets the request's scheduled date and time in milliseconds.
|
java.util.Date |
getScheduledTime()
Retrieves the date and time that the request was scheduled as a
Date object. |
java.lang.String |
getServerInstance()
Contains the name of the server processing the request.
|
long |
getServerTime()
Retrieves the time spent in the server processing the request.
|
SplusStatus |
getStatus()
Retrieves a job's status.
|
java.lang.String |
getTextOutput()
Retrieves any text that the call generated.
|
java.lang.String |
getVersion()
Retrieves the server XML version.
|
java.util.List<java.lang.String> |
getWarningList()
Retrieves all warnings as a result of running an expression or
function as a list of strings.
|
java.lang.String |
getWarnings()
Deprecated.
please use getWarningList() instead
|
java.lang.Boolean |
hasError()
Determines whether an object has an error.
|
java.lang.Boolean |
hasReturnValue()
Determines whether an object has a return value.
|
java.lang.Boolean |
hasTextOutput()
Determines whether an object has text output.
|
java.lang.Boolean |
hasWarnings()
Determines whether an object has warnings.
|
boolean |
isFinished()
Indicates whether the job is no longer running or is waiting to run.
|
void |
setCode(java.lang.String code)
Sets the text for the code.
|
void |
setCreated(java.lang.String created)
Sets the request date and time.
|
void |
setCreatedBy(java.lang.String createdBy)
Sets the ID of the request's creator.
|
void |
setCreatedMillis(long created)
Sets the request date and time in milliseconds.
|
void |
setEngineTime(long engineTime)
Sets the time spent in the engine while processing the request.
|
void |
setError(java.lang.String error)
Sets the text of the error
|
void |
setErrorCode(int errorCode)
Sets the error code that details specific error condition occurred.
|
void |
setHasError(java.lang.Boolean hasError)
Internal method.
|
void |
setHasReturnValue(java.lang.Boolean hasReturnValue)
Internal method.
|
void |
setHasTextOutput(java.lang.Boolean hasTextOutput)
Internal method.
|
void |
setHasWarnings(java.lang.Boolean hasWarnings)
Internal method.
|
void |
setIntStatus(java.lang.String intStatus)
Internal method.
|
void |
setJobId(java.lang.String jobId)
Sets the job ID.
|
void |
setPrepTime(long prepTime)
Sets the time spent preparing the engine to execute the request (included in engineTime).
|
void |
setQueuedTime(long queuedTime)
Sets the time this request spent in the queue.
|
void |
setResultsDir(java.lang.String resultsDir)
Sets the path of the directory where job results are stored.
|
void |
setReturnValue(SplusReturnValue returnValue)
Sets the
SplusReturnValue object. |
void |
setReturnValueRepresentation(ValueRepresentation returnValueRepresentation)
Sets the return value representation object.
|
void |
setScheduled(java.lang.String scheduled)
Sets the date and time to run the request.
|
void |
setScheduledMillis(long scheduled)
Sets the date and time to run the request in milliseconds.
|
void |
setServerInstance(java.lang.String serverInstance)
Sets the server to process a request.
|
void |
setServerTime(long serverTime)
Sets the time spent in the server processing the request.
|
void |
setStatus(SplusStatus status)
Sets the status of the job.
|
void |
setTextOutput(java.lang.String textOutput)
Sets the text output.
|
void |
setVersion(java.lang.String version)
Sets the server XML version.
|
void |
setWarnings(java.lang.String warnings)
Sets the text for warnings.
|
void |
throwExceptionIfError()
Possible exceptions that this class can throw.
|
java.lang.String |
toString() |
public SplusDataResult()
public SplusDataResult(int errorCode, java.lang.String errorMessage)
public SplusReturnValue getReturnValue()
SplusReturnValue
object containing the results of
the evaluation.SplusReturnValue
object containing the results of
the evaluation.setReturnValue(com.insightful.splusserver.domain.SplusReturnValue)
public void setReturnValue(SplusReturnValue returnValue)
SplusReturnValue
object. Typically, you would not set
this value. You only would get it from the server.returnValue
- The SplusReturnValue
object.getReturnValue()
public java.lang.Boolean hasReturnValue()
true
if the object has a return value; otherwise
false
.public java.lang.Boolean getHasReturnValue()
public void setHasReturnValue(java.lang.Boolean hasReturnValue)
public java.lang.String getJobId()
SplusDataResult
object
when you submit an evaluation. You can use this ID to check for results,
interrput the job, purge the job, or otherwise track and manage a job.setJobId(java.lang.String)
public void setJobId(java.lang.String jobId)
jobId
- The job ID.getJobId()
public SplusStatus getStatus()
#setStatus.
public void setStatus(SplusStatus status)
status
- A string indicating the job's status.getStatus()
public boolean isFinished()
true
if the job is finished; otherwise false
.public java.lang.String getIntStatus()
public void setIntStatus(java.lang.String intStatus)
public java.util.Date getCreatedTime()
Date
object.public java.util.Date getScheduledTime()
Date
object.public java.lang.String getCreated()
public void setCreated(java.lang.String created)
created
- A string specifying the request's creation date and time.public long getCreatedMillis()
public void setCreatedMillis(long created)
created
- A long specifying the request's creation date and time in milliseconds.public java.lang.String getCreatedBy()
public void setCreatedBy(java.lang.String createdBy)
createdBy
- A string specifying the request's creator.public java.lang.String getScheduled()
public void setScheduled(java.lang.String scheduled)
scheduled
- A string specifying the request's scheduled date and time.public void setScheduledMillis(long scheduled)
scheduled
- A long specifying the request's scheduled date and time in milliseconds.public long getScheduledMillis()
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- A string containing server XML version.public java.lang.String getError()
setError(java.lang.String)
public void setError(java.lang.String error)
error
- A string containing the error description.getError()
public java.lang.Boolean hasError()
true
if the object has an error; otherwise
false
.public java.lang.Boolean getHasError()
public void setHasError(java.lang.Boolean hasError)
public java.lang.String getTextOutput()
setTextOutput(java.lang.String)
public void setTextOutput(java.lang.String textOutput)
textOutput
- A string containing the text output to set.getTextOutput()
public java.lang.Boolean hasTextOutput()
true
if the object has text output; otherwise
false
.public java.lang.Boolean getHasTextOutput()
public void setHasTextOutput(java.lang.Boolean hasTextOutput)
@Deprecated public java.lang.String getWarnings()
setWarnings(String)
,
getWarningList()
public void setWarnings(java.lang.String warnings)
warnings
- A string containing the warning(s).getWarnings()
public java.util.List<java.lang.String> getWarningList()
public java.lang.Boolean hasWarnings()
true
if the object has warnings; otherwise
false
.public java.lang.Boolean getHasWarnings()
public void setHasWarnings(java.lang.Boolean hasWarnings)
public java.lang.String getCode()
setCode(java.lang.String)
public void setCode(java.lang.String code)
code
- A string containing the code.getCode()
public java.lang.String getResultsDir()
setResultsDir(java.lang.String)
public void setResultsDir(java.lang.String resultsDir)
resultsDir
- A string containing results directory path.getResultsDir()
public int getErrorCode()
public void setErrorCode(int errorCode)
The
- error Code.public java.lang.String getServerInstance()
public void setServerInstance(java.lang.String serverInstance)
serverInstance
- A string containing the name of the server.public long getEngineTime()
public void setEngineTime(long engineTime)
engineTime
- The time.public long getServerTime()
public void setServerTime(long serverTime)
serverTime
- The server time.public long getPrepTime()
public void setPrepTime(long prepTime)
prepTime
- The preparation time.public long getQueuedTime()
public void setQueuedTime(long queuedTime)
queuedTime
- The time spent in the queue.public ValueRepresentation getReturnValueRepresentation()
getReturnValue()
, which only allows retrieving if SPXML-encoded return values.public void setReturnValueRepresentation(ValueRepresentation returnValueRepresentation)
returnValueRepresentation
- return value representation objectpublic byte[] getReturnValueAsByteArray() throws JobDoesNotExistException, NotAuthenticatedException
JobDoesNotExistException
NotAuthenticatedException
public void throwExceptionIfError() throws JobDoesNotExistException, NotAuthenticatedException, java.lang.IllegalArgumentException
JobDoesNotExistException
- The job cannot be found on the server.NotAuthenticatedException
- The user cannot be authenticated because of an invalid password or user name.java.lang.IllegalArgumentException
- An argument passed to the server was not understood/allowedpublic java.lang.String toString()
toString
in class java.lang.Object
public <T extends SplusObject> T extractReturnValue(int index)
T
- index
-