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
-
- All Implemented Interfaces:
HasMessageKey
- Direct Known Subclasses:
AbstractBackgroundTask,AbstractPollingTask,BackgroundTaskHandlerImpl.TaskAccessor
public abstract class AbstractTask extends AbstractGlobalServerComponent implements HasMessageKey
Common class for bothPollingTasks andBackgroundTasks
-
-
Field Summary
Fields Modifier and Type Field Description protected ClusterHandlerclusterHandlerprotected 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()StringgetName()protected abstract booleanisVerbose()protected abstract StringlogName(String display)protected voidlogTaskError(String display, Throwable error)protected voidlogTaskSuccess(String display, long timeTaken, long affectedRecords)protected StringresolveName()protected booleanshouldGenerateErrorLog()-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.utils.HasMessageKey
getMessageKey
-
-
-
-
Field Detail
-
loggingHandler
@Autowired protected LoggingHandler loggingHandler
-
invokerHandler
@Autowired protected InvokerHandler invokerHandler
-
errorLogService
@Autowired protected ErrorLogServiceLocal errorLogService
-
clusterHandler
@Autowired protected ClusterHandler clusterHandler
-
-
Method Detail
-
getName
public final String getName()
-
getLogConfiguration
protected LogConfiguration getLogConfiguration()
-
isVerbose
protected abstract boolean isVerbose()
-
logTaskSuccess
protected void logTaskSuccess(String display, long timeTaken, long affectedRecords)
-
resolveName
protected String resolveName()
-
shouldGenerateErrorLog
protected boolean shouldGenerateErrorLog()
-
-