Last update: 2011-06-23

org.proteios.core.plugin
Interface Response


public interface Response

The response interface used by the core.

Version:
2.0
Author:
Nicklas, Enell
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Nested Class Summary
static class Response.Status
           
 
Method Summary
 void setAborted()
          This will end the job execution and report it as a aborted.
 void setAborted(String message)
          This will end the job execution and report it as a aborted.
 void setContinue(String nextCommand)
          This method will continue the configuration of the job with a new command to the plugin.
 void setDone(String message)
          This will end the job execution and report it as a success.
 void setDone(String message, Job.ExecutionTime estimatedExecutionTime)
          This will end the configuration of a job and set the estimated execution time for it.
 void setError(String message, List<? extends Throwable> errorList)
          This will end the job execution and report it as a failure.
 

Method Detail

setContinue

void setContinue(String nextCommand)
                 throws PermissionDeniedException
This method will continue the configuration of the job with a new command to the plugin. This response is only allowed while configuring a plugin or a job, not after executing the plugin.

Parameters:
nextCommand - the next command to the plugin
Throws:
PermissionDeniedException - If another command isn't allowed, ie. after an Request.COMMAND_EXECUTE command

setDone

void setDone(String message,
             Job.ExecutionTime estimatedExecutionTime)
This will end the configuration of a job and set the estimated execution time for it.

Parameters:
message - An optional message
estimatedExecutionTime - An estimated execution time for the job, null is the same as ExecutionTime.LONG

setDone

void setDone(String message)
This will end the job execution and report it as a success.

Parameters:
message - A message containing any relevant information about what the plugin did, or null.

setError

void setError(String message,
              List<? extends Throwable> errorList)
This will end the job execution and report it as a failure.

Parameters:
message - Information about the reason for the error
errorList - Detailed information about the error

setAborted

void setAborted()
This will end the job execution and report it as a aborted.


setAborted

void setAborted(String message)
This will end the job execution and report it as a aborted.

Parameters:
message - A message containing any relevant information about what the plugin did, or null.

Last update: 2011-06-23