Package com.aspectran.core.service
Class DefaultCoreService
java.lang.Object
com.aspectran.core.service.AbstractServiceLifeCycle
com.aspectran.core.service.AbstractCoreService
com.aspectran.core.service.DefaultCoreService
- All Implemented Interfaces:
CoreService
,ServiceLifeCycle
- Direct Known Subclasses:
AbstractDaemonService
,AbstractEmbeddedAspectran
,AbstractShellService
,AbstractTowService
,AbstractWebService
The Class DefaultCoreService.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new DefaultCoreService.DefaultCoreService
(CoreService parentService, boolean derived) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method is executed immediately after the ActivityContext is loaded.protected void
This method executed just before the ActivityContext is destroyed.protected void
protected void
configure
(AspectranConfig aspectranConfig) protected void
protected void
doStart()
protected void
doStop()
void
start()
Starts the service.void
stop()
Stops the service.Methods inherited from class com.aspectran.core.service.AbstractCoreService
buildSchedulerService, destroySchedulerService, getActivityContext, getActivityContextBuilder, getAltClassLoader, getApplicationAdapter, getAspectranConfig, getBasePath, getContextName, getDefaultActivity, getSchedulerService, getServiceClassLoader, getServiceLifeCycle, getServiceName, hasActivityContextBuilder, hasServiceClassLoader, isAcceptable, isDerived, setActivityContext, setActivityContextBuilder, setAltClassLoader, setAspectranConfig, setBasePath, setContextName, setRequestAcceptor, setServiceClassLoader
Methods inherited from class com.aspectran.core.service.AbstractServiceLifeCycle
addService, getLock, getParentService, getRootService, isActive, isBusy, isOrphan, isRootService, pause, pause, removeService, restart, restart, resume, setServiceStateListener, withdraw
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
getParentService, getRootService, isOrphan, isRootService
-
Constructor Details
-
DefaultCoreService
public DefaultCoreService()Instantiates a new DefaultCoreService. -
DefaultCoreService
-
-
Method Details
-
configure
-
buildActivityContext
- Throws:
ActivityContextBuilderException
-
destroyActivityContext
protected void destroyActivityContext() -
afterContextLoaded
This method is executed immediately after the ActivityContext is loaded.- Throws:
Exception
- if an error occurs
-
beforeContextDestroy
protected void beforeContextDestroy()This method executed just before the ActivityContext is destroyed. -
start
Description copied from interface:ServiceLifeCycle
Starts the service.- Specified by:
start
in interfaceServiceLifeCycle
- Overrides:
start
in classAbstractServiceLifeCycle
- Throws:
Exception
- if the service control fails
-
stop
public void stop()Description copied from interface:ServiceLifeCycle
Stops the service. Destroys any services and resources that are dependent on this service.- Specified by:
stop
in interfaceServiceLifeCycle
- Overrides:
stop
in classAbstractServiceLifeCycle
-
doStart
- Specified by:
doStart
in classAbstractServiceLifeCycle
- Throws:
Exception
-
doStop
protected void doStop()- Specified by:
doStop
in classAbstractServiceLifeCycle
-