Package com.aspectran.core.service
Class AbstractCoreService
- java.lang.Object
-
- com.aspectran.core.service.AbstractServiceController
-
- com.aspectran.core.service.AbstractCoreService
-
- All Implemented Interfaces:
CoreService,ServiceController
- Direct Known Subclasses:
AspectranCoreService
public abstract class AbstractCoreService extends AbstractServiceController implements CoreService
The Class AbstractCoreService.
-
-
Constructor Summary
Constructors Constructor Description AbstractCoreService()AbstractCoreService(CoreService rootService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddestroyActivityContext()protected voiddetermineBasePath()ActivityContextgetActivityContext()Returns the activity context.AspectranClassLoadergetAspectranClassLoader()Returns the aspectran class loader.AspectranConfiggetAspectranConfig()Returns the Aspectran configuration parameters used to generate the AspectranService.java.lang.StringgetBasePath()Returns the base path where the root application is running.ActivitygetDefaultActivity()Returns the default activity.SchedulerServicegetSchedulerService()ServiceControllergetServiceController()Returns the service controller for this service.booleanisDerived()Returns whether this service is derived from another root service.protected booleanisExposable(java.lang.String transletName)booleanisHardReload()Returns whether to reload all Java classes, resources, and activity context configurations.booleanisLateStart()Returns whether the service should be started separately late after the root service is started.voidjoinDerivedService(CoreService coreService)Add a derived core service.voidleaveFromRootService()protected voidloadActivityContext()protected voidprepare(AspectranConfig aspectranConfig)voidsetActivityContext(ActivityContext activityContext)protected voidsetBasePath(java.lang.String basePath)protected voidsetExposals(java.lang.String[] includePatterns, java.lang.String[] excludePatterns)voidwithdrawDerivedService(CoreService coreService)-
Methods inherited from class com.aspectran.core.service.AbstractServiceController
clearDerivedService, doPause, doPause, doResume, doStart, doStop, getLock, getServiceName, isActive, isBusy, joinDerivedService, pause, pause, restart, restart, resume, setServiceStateListener, start, stop, withdrawDerivedService
-
-
-
-
Constructor Detail
-
AbstractCoreService
public AbstractCoreService()
-
AbstractCoreService
public AbstractCoreService(CoreService rootService)
-
-
Method Detail
-
getBasePath
public java.lang.String getBasePath()
Description copied from interface:CoreServiceReturns the base path where the root application is running.- Specified by:
getBasePathin interfaceCoreService- Returns:
- the base path for the root application
-
setBasePath
protected void setBasePath(java.lang.String basePath)
-
isLateStart
public boolean isLateStart()
Description copied from interface:CoreServiceReturns whether the service should be started separately late after the root service is started.- Specified by:
isLateStartin interfaceCoreService- Returns:
- true if the service should start separately late; false otherwise
-
isHardReload
public boolean isHardReload()
Description copied from interface:CoreServiceReturns whether to reload all Java classes, resources, and activity context configurations.- Specified by:
isHardReloadin interfaceCoreService- Returns:
- false if only the activity context configuration is reloaded; true if all are reloaded
-
getServiceController
public ServiceController getServiceController()
Description copied from interface:CoreServiceReturns the service controller for this service.- Specified by:
getServiceControllerin interfaceCoreService- Returns:
- the service controller
-
joinDerivedService
public void joinDerivedService(CoreService coreService)
Description copied from interface:CoreServiceAdd a derived core service. Derived services follow the life cycle of the root service.- Specified by:
joinDerivedServicein interfaceCoreService- Parameters:
coreService- the core service
-
withdrawDerivedService
public void withdrawDerivedService(CoreService coreService)
- Specified by:
withdrawDerivedServicein interfaceCoreService
-
leaveFromRootService
public void leaveFromRootService()
- Specified by:
leaveFromRootServicein interfaceCoreService
-
isDerived
public boolean isDerived()
Description copied from class:AbstractServiceControllerReturns whether this service is derived from another root service.- Specified by:
isDerivedin interfaceCoreService- Specified by:
isDerivedin classAbstractServiceController- Returns:
- whether this service is derived
-
isExposable
protected boolean isExposable(java.lang.String transletName)
-
setExposals
protected void setExposals(java.lang.String[] includePatterns, java.lang.String[] excludePatterns)
-
prepare
protected void prepare(AspectranConfig aspectranConfig) throws AspectranServiceException
- Throws:
AspectranServiceException
-
loadActivityContext
protected void loadActivityContext() throws ActivityContextBuilderException- Throws:
ActivityContextBuilderException
-
destroyActivityContext
protected void destroyActivityContext()
-
getActivityContext
public ActivityContext getActivityContext()
Description copied from interface:CoreServiceReturns the activity context.- Specified by:
getActivityContextin interfaceCoreService- Returns:
- the activity context
-
setActivityContext
public void setActivityContext(ActivityContext activityContext)
-
getDefaultActivity
public Activity getDefaultActivity()
Description copied from interface:CoreServiceReturns the default activity.- Specified by:
getDefaultActivityin interfaceCoreService- Returns:
- the default activity
-
getAspectranClassLoader
public AspectranClassLoader getAspectranClassLoader()
Description copied from interface:CoreServiceReturns the aspectran class loader.- Specified by:
getAspectranClassLoaderin interfaceCoreService- Returns:
- the aspectran class loader
-
getAspectranConfig
public AspectranConfig getAspectranConfig()
Description copied from interface:CoreServiceReturns the Aspectran configuration parameters used to generate the AspectranService.- Specified by:
getAspectranConfigin interfaceCoreService- Returns:
- the Aspectran Configuration Parameters
-
getSchedulerService
public SchedulerService getSchedulerService()
- Specified by:
getSchedulerServicein interfaceCoreService
-
determineBasePath
protected void determineBasePath()
-
-