Class AbstractActivityContextBuilder
java.lang.Object
com.aspectran.core.context.builder.AbstractActivityContextBuilder
- All Implemented Interfaces:
ActivityContextBuilder
- Direct Known Subclasses:
HybridActivityContextBuilder
public abstract class AbstractActivityContextBuilder
extends Object
implements ActivityContextBuilder
-
Field Summary
Fields inherited from interface com.aspectran.core.context.builder.ActivityContextBuilder
DEBUG_MODE_PROPERTY_NAME, USE_APON_TO_LOAD_XML_PROPERTY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
configure
(ContextConfig contextConfig) protected ActivityContext
createActivityContext
(ActivityRuleAssistant assistant) Returns a new instance of ActivityContext.protected ApplicationAdapter
protected EnvironmentProfiles
createEnvironmentProfiles
(String contextName) protected SiblingClassLoader
createSiblingClassLoader
(String contextName, ClassLoader parentClassLoader) String[]
String[]
Returns the base packages to scan for annotated components.String[]
String[]
String[]
String[]
boolean
boolean
boolean
Returns whether to reload all Java classes, resources, and activity context configurations.protected boolean
void
putPropertyItemRule
(ItemRule propertyItemRule) void
setActiveProfiles
(String... activeProfiles) void
setAspectranParameters
(AspectranParameters aspectranParameters) void
setBasePackages
(String... basePackages) Sets the base packages to scan for annotated components.void
setBasePath
(String basePath) void
setBaseProfiles
(String... baseProfiles) void
setContextRules
(String[] contextRules) void
setDebugMode
(boolean debugMode) void
setDefaultProfiles
(String... defaultProfiles) void
setEncoding
(String encoding) void
setHardReload
(boolean hardReload) protected void
setOwnBasePath
(boolean ownBasePath) void
setResourceLocations
(String... resourceLocations) void
setUseAponToLoadXml
(boolean useAponToLoadXml) protected void
protected void
-
Constructor Details
-
AbstractActivityContextBuilder
-
-
Method Details
-
getBasePath
- Specified by:
getBasePath
in interfaceActivityContextBuilder
-
setBasePath
- Specified by:
setBasePath
in interfaceActivityContextBuilder
-
hasOwnBasePath
public boolean hasOwnBasePath()- Specified by:
hasOwnBasePath
in interfaceActivityContextBuilder
-
setOwnBasePath
protected void setOwnBasePath(boolean ownBasePath) -
getMasterService
- Specified by:
getMasterService
in interfaceActivityContextBuilder
-
getContextConfig
- Specified by:
getContextConfig
in interfaceActivityContextBuilder
-
getAspectranParameters
- Specified by:
getAspectranParameters
in interfaceActivityContextBuilder
-
setAspectranParameters
- Specified by:
setAspectranParameters
in interfaceActivityContextBuilder
-
getContextRules
- Specified by:
getContextRules
in interfaceActivityContextBuilder
-
setContextRules
- Specified by:
setContextRules
in interfaceActivityContextBuilder
-
getEncoding
- Specified by:
getEncoding
in interfaceActivityContextBuilder
-
setEncoding
- Specified by:
setEncoding
in interfaceActivityContextBuilder
-
getResourceLocations
- Specified by:
getResourceLocations
in interfaceActivityContextBuilder
-
setResourceLocations
- Specified by:
setResourceLocations
in interfaceActivityContextBuilder
-
getBasePackages
Description copied from interface:ActivityContextBuilder
Returns the base packages to scan for annotated components.- Specified by:
getBasePackages
in interfaceActivityContextBuilder
- Returns:
- the base packages
-
setBasePackages
Description copied from interface:ActivityContextBuilder
Sets the base packages to scan for annotated components.- Specified by:
setBasePackages
in interfaceActivityContextBuilder
- Parameters:
basePackages
- the base packages to scan
-
getBaseProfiles
-
setBaseProfiles
-
getDefaultProfiles
- Specified by:
getDefaultProfiles
in interfaceActivityContextBuilder
-
setDefaultProfiles
- Specified by:
setDefaultProfiles
in interfaceActivityContextBuilder
-
getActiveProfiles
- Specified by:
getActiveProfiles
in interfaceActivityContextBuilder
-
setActiveProfiles
- Specified by:
setActiveProfiles
in interfaceActivityContextBuilder
-
putPropertyItemRule
- Specified by:
putPropertyItemRule
in interfaceActivityContextBuilder
-
isHardReload
public boolean isHardReload()Description copied from interface:ActivityContextBuilder
Returns whether to reload all Java classes, resources, and activity context configurations.- Specified by:
isHardReload
in interfaceActivityContextBuilder
- Returns:
- false if only the activity context configuration is reloaded; true if all are reloaded
-
setHardReload
public void setHardReload(boolean hardReload) - Specified by:
setHardReload
in interfaceActivityContextBuilder
-
getClassLoader
- Specified by:
getClassLoader
in interfaceActivityContextBuilder
-
configure
public void configure(@Nullable ContextConfig contextConfig) throws IOException, InvalidResourceException - Specified by:
configure
in interfaceActivityContextBuilder
- Throws:
IOException
InvalidResourceException
-
isUseAponToLoadXml
protected boolean isUseAponToLoadXml() -
setUseAponToLoadXml
public void setUseAponToLoadXml(boolean useAponToLoadXml) - Specified by:
setUseAponToLoadXml
in interfaceActivityContextBuilder
-
isDebugMode
public boolean isDebugMode() -
setDebugMode
public void setDebugMode(boolean debugMode) - Specified by:
setDebugMode
in interfaceActivityContextBuilder
-
createSiblingClassLoader
protected SiblingClassLoader createSiblingClassLoader(String contextName, ClassLoader parentClassLoader) throws InvalidResourceException - Throws:
InvalidResourceException
-
createApplicationAdapter
-
createEnvironmentProfiles
-
createActivityContext
protected ActivityContext createActivityContext(@NonNull ActivityRuleAssistant assistant) throws BeanReferenceException, IllegalRuleException Returns a new instance of ActivityContext.- Parameters:
assistant
- the activity rule assistant- Returns:
- the activity context
- Throws:
BeanReferenceException
- will be thrown when cannot resolve reference to beanIllegalRuleException
- if an illegal rule is found
-
startContextReloadingTimer
protected void startContextReloadingTimer() -
stopContextReloadingTimer
protected void stopContextReloadingTimer() -
clear
public void clear()- Specified by:
clear
in interfaceActivityContextBuilder
-