Package com.aspectran.daemon.service
Class AspectranDaemonService
- java.lang.Object
-
- com.aspectran.core.service.AbstractServiceController
-
- com.aspectran.core.service.AbstractCoreService
-
- com.aspectran.core.service.AspectranCoreService
-
- com.aspectran.daemon.service.AspectranDaemonService
-
- All Implemented Interfaces:
CoreService,ServiceController,DaemonService
public class AspectranDaemonService extends AspectranCoreService implements DaemonService
The Class AspectranDaemonService.- Since:
- 5.1.0
-
-
Constructor Summary
Constructors Constructor Description AspectranDaemonService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterContextLoaded()This method is executed immediately after the ActivityContext is loaded.voidbeforeContextDestroy()This method executed just before the ActivityContext is destroyed.static AspectranDaemonServicecreate(AspectranConfig aspectranConfig)Returns a new instance ofAspectranDaemonService.static AspectranDaemonServicecreate(java.lang.String appConfigRootFile)Returns a new instance ofAspectranDaemonService.SessionAdapternewSessionAdapter()Creates a new session adapter for the daemon service and returns.java.lang.Stringtemplate(java.lang.String templateId, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Evaluates the template with a set of parameters and attributes.Translettranslate(java.lang.String name, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet.Translettranslate(java.lang.String name, MethodType method, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet.-
Methods inherited from class com.aspectran.core.service.AspectranCoreService
doPause, doPause, doRestart, doResume, doStart, doStop
-
Methods inherited from class com.aspectran.core.service.AbstractCoreService
createSchedulerService, destroyActivityContext, determineBasePath, getActivityContext, getApplicationAdapter, getAspectranClassLoader, getAspectranConfig, getBasePath, getServiceController, isDerived, isExposable, isHardReload, isLateStart, joinDerivedService, loadActivityContext, prepare, setActivityContext, setBasePath, setExposals
-
Methods inherited from class com.aspectran.core.service.AbstractServiceController
getLock, getServiceName, isActive, isBusy, joinDerivedService, pause, pause, restart, restart, resume, setServiceStateListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspectran.core.service.CoreService
getActivityContext, getApplicationAdapter, getAspectranClassLoader, getAspectranConfig, getBasePath, getServiceController, isHardReload, isLateStart, joinDerivedService
-
-
-
-
Method Detail
-
afterContextLoaded
public void afterContextLoaded() throws java.lang.ExceptionDescription copied from class:AspectranCoreServiceThis method is executed immediately after the ActivityContext is loaded.- Overrides:
afterContextLoadedin classAspectranCoreService- Throws:
java.lang.Exception- if an error occurs
-
beforeContextDestroy
public void beforeContextDestroy()
Description copied from class:AspectranCoreServiceThis method executed just before the ActivityContext is destroyed.- Overrides:
beforeContextDestroyin classAspectranCoreService
-
newSessionAdapter
public SessionAdapter newSessionAdapter()
Description copied from interface:DaemonServiceCreates a new session adapter for the daemon service and returns.- Specified by:
newSessionAdapterin interfaceDaemonService- Returns:
- the session adapter
-
translate
public Translet translate(java.lang.String name, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet.- Specified by:
translatein interfaceDaemonService- Parameters:
name- the translet nameparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
public Translet translate(java.lang.String name, MethodType method, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet.- Specified by:
translatein interfaceDaemonService- Parameters:
name- the translet namemethod- the request methodparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the
Transletobject
-
template
public java.lang.String template(java.lang.String templateId, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Evaluates the template with a set of parameters and attributes.- Specified by:
templatein interfaceDaemonService- Parameters:
templateId- the template idparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the output string of the template
-
create
public static AspectranDaemonService create(java.lang.String appConfigRootFile)
Returns a new instance ofAspectranDaemonService.- Parameters:
appConfigRootFile- the application configuration root file- Returns:
- the instance of
AspectranDaemonService
-
create
public static AspectranDaemonService create(AspectranConfig aspectranConfig)
Returns a new instance ofAspectranDaemonService.- Parameters:
aspectranConfig- the parameters for aspectran configuration- Returns:
- the instance of
AspectranDaemonService
-
-