java.lang.Object
de.grogra.api.APIRunner
- All Implemented Interfaces:
Command
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addPoint
(String string, JSONObject obj) void
addResponseContent
(byte[] value) void
addResponseContent
(String key, Object[] value) void
addResponseContent
(String key, String value) void
addResponseContent
(String key, JSONArray list) void
void
execute()
Returns a name which can be used in the graphical user interface to represent this command.byte[]
getParameter
(String key, boolean nullable) getPath()
void
Performs the actions of this command.void
setCode
(int c) void
void
void
void
void
-
Field Details
-
STATUS_NO_CONTENT
public static final int STATUS_NO_CONTENT- See Also:
-
STATUS_OK
public static final int STATUS_OK- See Also:
-
STATUS_BAD_REQUEST
public static final int STATUS_BAD_REQUEST- See Also:
-
STATUS_NOT_FOUND
public static final int STATUS_NOT_FOUND- See Also:
-
STATUS_UNSUPPORTED_MEDIA_TYPE
public static final int STATUS_UNSUPPORTED_MEDIA_TYPE- See Also:
-
STATUS_IM_A_TEAPOT
public static final int STATUS_IM_A_TEAPOT- See Also:
-
STATUS_LOCKED
public static final int STATUS_LOCKED- See Also:
-
STATUS_INTERNAL_SERVER_ERROR
public static final int STATUS_INTERNAL_SERVER_ERROR- See Also:
-
STATUS_NOT_IMPLEMENTED
public static final int STATUS_NOT_IMPLEMENTED- See Also:
-
INP_NAME
- See Also:
-
INP_NEW_NAME
- See Also:
-
INP_SYSTEM_PATH
- See Also:
-
INP_FILE_EXTENSION
- See Also:
-
RETURN_DATA
- See Also:
-
RETURN_RESULT
- See Also:
-
RETURN_MESSAGE
- See Also:
-
RETURN_ID
- See Also:
-
RETURN_ERROR
- See Also:
-
gcCounter
public static int gcCounter
-
-
Constructor Details
-
APIRunner
-
-
Method Details
-
setCommand
- Throws:
APICommandNotFoundException
-
getPath
-
setPath
-
run
Description copied from interface:Command
Performs the actions of this command. This method is invoked by theJobManager
after the command has been submitted to the job manager by one ofexecute
,runAt
, orrunLater
-methods. The argumentsinfo
andcontext
are the arguments which have been provided as arguments to theJobManager
-methods. -
collectAndSend
-
execute
- Throws:
APICommandNotFoundException
-
getParameter
- Throws:
Exception
-
getContent
public byte[] getContent() -
addResponseContent
-
addResponseContent
-
addResponseContent
public void addResponseContent(byte[] value) -
setCode
public void setCode(int c) -
setReason
-
setResponseType
-
setSendLater
public void setSendLater() -
addPoint
-
addList
-
addResponseContent
-
getWorkbench
-
addList
-
getCommandName
Description copied from interface:Command
Returns a name which can be used in the graphical user interface to represent this command.- Specified by:
getCommandName
in interfaceCommand
- Returns:
- this commands's name
-