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 void
destroyActivityContext()
protected void
determineBasePath()
ActivityContext
getActivityContext()
Returns the activity context.AspectranClassLoader
getAspectranClassLoader()
Returns the aspectran class loader.AspectranConfig
getAspectranConfig()
Returns the Aspectran configuration parameters used to generate the AspectranService.java.lang.String
getBasePath()
Returns the base path where the root application is running.Activity
getDefaultActivity()
Returns the default activity.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.void
leaveFromRootService()
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)
void
withdrawDerivedService(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:CoreService
Returns the base path where the root application is running.- Specified by:
getBasePath
in 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: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
Returns the activity context.- Specified by:
getActivityContext
in interfaceCoreService
- Returns:
- the activity context
-
setActivityContext
public void setActivityContext(ActivityContext activityContext)
-
getDefaultActivity
public Activity getDefaultActivity()
Description copied from interface:CoreService
Returns the default activity.- Specified by:
getDefaultActivity
in interfaceCoreService
- Returns:
- the default activity
-
getAspectranClassLoader
public AspectranClassLoader getAspectranClassLoader()
Description copied from interface:CoreService
Returns 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
-
withdrawDerivedService
public void withdrawDerivedService(CoreService coreService)
- Specified by:
withdrawDerivedService
in interfaceCoreService
-
leaveFromRootService
public void leaveFromRootService()
- Specified by:
leaveFromRootService
in interfaceCoreService
-
isDerived
public boolean isDerived()
Description copied from class:AbstractServiceController
Returns whether this service is derived from another root service.- Specified by:
isDerived
in interfaceCoreService
- 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()
-
-