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 void
afterContextLoaded()
This method is executed immediately after the ActivityContext is loaded.void
beforeContextDestroy()
This method executed just before the ActivityContext is destroyed.static AspectranDaemonService
create(AspectranConfig aspectranConfig)
Returns a new instance ofAspectranDaemonService
.static AspectranDaemonService
create(java.lang.String appConfigRootFile)
Returns a new instance ofAspectranDaemonService
.SessionAdapter
newSessionAdapter()
Creates a new session adapter for the daemon service and returns.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.Translet
translate(java.lang.String name, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet.Translet
translate(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.Exception
Description copied from class:AspectranCoreService
This method is executed immediately after the ActivityContext is loaded.- Overrides:
afterContextLoaded
in classAspectranCoreService
- Throws:
java.lang.Exception
- if an error occurs
-
beforeContextDestroy
public void beforeContextDestroy()
Description copied from class:AspectranCoreService
This method executed just before the ActivityContext is destroyed.- Overrides:
beforeContextDestroy
in classAspectranCoreService
-
newSessionAdapter
public SessionAdapter newSessionAdapter()
Description copied from interface:DaemonService
Creates a new session adapter for the daemon service and returns.- Specified by:
newSessionAdapter
in 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:
translate
in interfaceDaemonService
- Parameters:
name
- the translet nameparameterMap
- the parameter mapattributeMap
- the attribute map- Returns:
- the
Translet
object
-
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:
translate
in interfaceDaemonService
- Parameters:
name
- the translet namemethod
- the request methodparameterMap
- the parameter mapattributeMap
- the attribute map- Returns:
- the
Translet
object
-
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:
template
in 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
-
-