java.lang.Object
de.grogra.api.APIRunner
- All Implemented Interfaces:
Command
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddPoint(String string, JSONObject obj) voidaddResponseContent(byte[] value) voidaddResponseContent(String key, Object[] value) voidaddResponseContent(String key, String value) voidaddResponseContent(String key, JSONArray list) voidvoidexecute()Returns a name which can be used in the graphical user interface to represent this command.byte[]getParameter(String key, boolean nullable) getPath()voidPerforms the actions of this command.voidsetCode(int c) voidvoidvoidvoidvoid
-
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:
-
INP_NODE_ID
- 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:CommandPerforms the actions of this command. This method is invoked by theJobManagerafter the command has been submitted to the job manager by one ofexecute,runAt, orrunLater-methods. The argumentsinfoandcontextare 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:CommandReturns a name which can be used in the graphical user interface to represent this command.- Specified by:
getCommandNamein interfaceCommand- Returns:
- this commands's name
-