Package org.cyclos.impl.utils.tasks
Class AbstractTask
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractGlobalServerComponent
-
- org.cyclos.impl.utils.tasks.AbstractTask
-
- Direct Known Subclasses:
AbstractBackgroundTask,AbstractPollingTask
public abstract class AbstractTask extends AbstractGlobalServerComponent
Common class for bothPollingTasks andBackgroundTasks
-
-
Field Summary
Fields Modifier and Type Field Description protected ErrorLogServiceLocalerrorLogServiceprotected InvokerHandlerinvokerHandlerprotected LoggingHandlerloggingHandler-
Fields inherited from class org.cyclos.impl.AbstractGlobalServerComponent
rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected LogConfigurationgetLogConfiguration()abstract StringgetName()protected StringlogName(String context)protected voidlogTaskError(String context, Throwable error)protected voidlogTaskSuccess(String context, long timeTaken, long affectedRecords)protected booleanshouldGenerateErrorLog()StringtoString()-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Field Detail
-
loggingHandler
@Autowired protected LoggingHandler loggingHandler
-
invokerHandler
@Autowired protected InvokerHandler invokerHandler
-
errorLogService
@Autowired protected ErrorLogServiceLocal errorLogService
-
-
Method Detail
-
getName
public abstract String getName()
-
getLogConfiguration
protected LogConfiguration getLogConfiguration()
-
logTaskSuccess
protected void logTaskSuccess(String context, long timeTaken, long affectedRecords)
-
shouldGenerateErrorLog
protected boolean shouldGenerateErrorLog()
-
-