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(ApplicationAdapter applicationAdapter)
AbstractCoreService(CoreService rootService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
destroyActivityContext()
protected void
determineBasePath()
ActivityContext
getActivityContext()
Gets the activity context.ApplicationAdapter
getApplicationAdapter()
Gets the application adapter.AspectranClassLoader
getAspectranClassLoader()
Gets the aspectran class loader.AspectranConfig
getAspectranConfig()
Returns the Aspectran configuration parameters used to generate the AspectranService.java.lang.String
getBasePath()
SchedulerService
getSchedulerService()
ServiceController
getServiceController()
Returns the service controller for this service.boolean
isDerived()
Returns whether this service is derived from another root service.protected boolean
isExposable(java.lang.String transletName)
boolean
isHardReload()
Returns whether to reload all Java classes, resources, and activity context configurations.boolean
isLateStart()
Returns whether the service should be started separately late after the root service is started.void
joinDerivedService(CoreService coreService)
Add a derived core service.protected void
loadActivityContext()
protected void
prepare(AspectranConfig aspectranConfig)
void
setActivityContext(ActivityContext activityContext)
protected void
setBasePath(java.lang.String basePath)
protected void
setExposals(java.lang.String[] includePatterns, java.lang.String[] excludePatterns)
-
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
-
-
-
-
Constructor Detail
-
AbstractCoreService
public AbstractCoreService(ApplicationAdapter applicationAdapter)
-
AbstractCoreService
public AbstractCoreService(CoreService rootService)
-
-
Method Detail
-
getApplicationAdapter
public ApplicationAdapter getApplicationAdapter()
Description copied from interface:CoreService
Gets the application adapter.- Specified by:
getApplicationAdapter
in interfaceCoreService
- Returns:
- the application adapter
-
getBasePath
public java.lang.String getBasePath()
- Specified by:
getBasePath
in interfaceCoreService
-
setBasePath
protected void setBasePath(java.lang.String basePath)
-
isLateStart
public boolean isLateStart()
Description copied from interface:CoreService
Returns whether the service should be started separately late after the root service is started.- Specified by:
isLateStart
in interfaceCoreService
- Returns:
- true if the service should start separately late; false otherwise
-
getActivityContext
public ActivityContext getActivityContext()
Description copied from interface:CoreService
Gets the activity context.- Specified by:
getActivityContext
in interfaceCoreService
- Returns:
- the activity context
-
setActivityContext
public void setActivityContext(ActivityContext activityContext)
-
getAspectranClassLoader
public AspectranClassLoader getAspectranClassLoader()
Description copied from interface:CoreService
Gets the aspectran class loader.- Specified by:
getAspectranClassLoader
in interfaceCoreService
- Returns:
- the aspectran class loader
-
getAspectranConfig
public AspectranConfig getAspectranConfig()
Description copied from interface:CoreService
Returns the Aspectran configuration parameters used to generate the AspectranService.- Specified by:
getAspectranConfig
in interfaceCoreService
- Returns:
- the Aspectran Configuration Parameters
-
isHardReload
public boolean isHardReload()
Description copied from interface:CoreService
Returns whether to reload all Java classes, resources, and activity context configurations.- Specified by:
isHardReload
in interfaceCoreService
- Returns:
- false if only the activity context configuration is reloaded; true if all are reloaded
-
getServiceController
public ServiceController getServiceController()
Description copied from interface:CoreService
Returns the service controller for this service.- Specified by:
getServiceController
in interfaceCoreService
- Returns:
- the service controller
-
joinDerivedService
public void joinDerivedService(CoreService coreService)
Description copied from interface:CoreService
Add a derived core service. Derived services follow the life cycle of the root service.- Specified by:
joinDerivedService
in interfaceCoreService
- Parameters:
coreService
- the core service
-
isDerived
public boolean isDerived()
Description copied from class:AbstractServiceController
Returns whether this service is derived from another root service.- Specified by:
isDerived
in classAbstractServiceController
- Returns:
- whether this service is derived
-
prepare
protected void prepare(AspectranConfig aspectranConfig) throws AspectranServiceException
- Throws:
AspectranServiceException
-
setExposals
protected void setExposals(java.lang.String[] includePatterns, java.lang.String[] excludePatterns)
-
isExposable
protected boolean isExposable(java.lang.String transletName)
-
loadActivityContext
protected void loadActivityContext() throws ActivityContextBuilderException
- Throws:
ActivityContextBuilderException
-
destroyActivityContext
protected void destroyActivityContext()
-
getSchedulerService
public SchedulerService getSchedulerService()
-
determineBasePath
protected void determineBasePath()
-
-