|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.http.server.util.ARequestHandler
org.eclipse.smila.http.server.json.JsonRequestHandler
org.eclipse.smila.jobmanager.httphandler.AJobManagerHandler
public abstract class AJobManagerHandler
base class for JobManager ReST call handlers. Manages service reference to jobmanager, and adds common error handling.
Field Summary |
---|
Fields inherited from class org.eclipse.smila.http.server.json.JsonRequestHandler |
---|
FACTORY, HTTP_UTILS |
Constructor Summary | |
---|---|
AJobManagerHandler()
|
Method Summary | |
---|---|
DefinitionPersistence |
getDefinitionPersistence()
get DefinitionPersistence service. |
protected int |
getErrorStatus(java.lang.String method,
java.lang.String requestUri,
java.lang.Throwable ex)
Adapt error handling of JsonRequestHandler.getErrorStatus(String, String, Throwable) . |
JobRunDataProvider |
getJobRunDataProvider()
get JobRunDataProvider service. |
JobRunEngine |
getJobRunEngine()
get JobRunEngine service. |
JobTaskProcessor |
getJobTaskProcessor()
get JobTaskProcessor service. |
protected boolean |
isDeleteRequest(java.lang.String method)
accept DELETE requests. |
protected boolean |
isGetOrDeleteRequest(java.lang.String method)
accept GET or DELETE requests. |
protected boolean |
isGetOrPostRequest(java.lang.String method)
accept GET or POST requests. |
protected boolean |
isGetRequest(java.lang.String method)
accept GET requests. |
protected boolean |
isPostRequest(java.lang.String method)
accept POST requests. |
protected boolean |
isValidMethod(java.lang.String method,
java.lang.String requestUri)
Set GET instead of POST as basic method. |
void |
setDefinitionPersistence(DefinitionPersistence defPersistence)
set OSGI service. |
void |
setJobRunDataProvider(JobRunDataProvider jobRunDataProvider)
set OSGI service. |
void |
setJobRunEngine(JobRunEngine jobRunEngine)
set OSGI service. |
void |
setJobTaskProcessor(JobTaskProcessor jobTaskProcessor)
set OSGI service. |
void |
unsetDefinitionPersistence(DefinitionPersistence defPersistence)
unset OSGI service. |
void |
unsetJobRunDataProvider(JobRunDataProvider jobRunDataProvider)
unset OSGI service. |
void |
unsetJobRunEngine(JobRunEngine jobRunEngine)
unset OSGI service. |
void |
unsetJobTaskProcessor(JobTaskProcessor jobTaskProcessor)
unset OSGI service. |
Methods inherited from class org.eclipse.smila.http.server.json.JsonRequestHandler |
---|
getRequestHost, getSuccessStatus, getSuccessStatus, handle, process, writeErrorResult, writeResultObject, writeSuccessResult |
Methods inherited from class org.eclipse.smila.http.server.util.ARequestHandler |
---|
activate, getDynamicUriParts, getRootContextPath, getStaticUriParts, getUriPattern, matches, urlDecode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AJobManagerHandler()
Method Detail |
---|
public JobRunDataProvider getJobRunDataProvider()
JobRunDataProvider
service.
public JobRunEngine getJobRunEngine()
JobRunEngine
service.
public JobTaskProcessor getJobTaskProcessor()
JobTaskProcessor
service.
public DefinitionPersistence getDefinitionPersistence()
DefinitionPersistence
service.
protected boolean isValidMethod(java.lang.String method, java.lang.String requestUri)
isValidMethod
in class JsonRequestHandler
method
- HTTP methodrequestUri
- request URI
protected boolean isGetRequest(java.lang.String method)
protected boolean isPostRequest(java.lang.String method)
protected boolean isDeleteRequest(java.lang.String method)
protected boolean isGetOrDeleteRequest(java.lang.String method)
protected boolean isGetOrPostRequest(java.lang.String method)
protected int getErrorStatus(java.lang.String method, java.lang.String requestUri, java.lang.Throwable ex)
JsonRequestHandler.getErrorStatus(String, String, Throwable)
. to
JobManager exceptions:
IllegalArgumentException
, InvalidConfigException
, InvalidDefinitionException
,
InvalidValueTypeException
: 400 BAD REQUEST
PersistenceException
: 500 INTERNAL SERVER ERROR
getErrorStatus
in class JsonRequestHandler
HTTP_UTILS#getErrorStatus(String, String, Throwable)
public void setJobRunDataProvider(JobRunDataProvider jobRunDataProvider)
public void unsetJobRunDataProvider(JobRunDataProvider jobRunDataProvider)
public void setJobRunEngine(JobRunEngine jobRunEngine)
public void unsetJobRunEngine(JobRunEngine jobRunEngine)
public void setJobTaskProcessor(JobTaskProcessor jobTaskProcessor)
public void unsetJobTaskProcessor(JobTaskProcessor jobTaskProcessor)
public void setDefinitionPersistence(DefinitionPersistence defPersistence)
public void unsetDefinitionPersistence(DefinitionPersistence defPersistence)
|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |