Package com.aspectran.embed.service
Interface EmbeddedAspectran
-
- All Superinterfaces:
com.aspectran.core.service.CoreService
- All Known Implementing Classes:
AbstractEmbeddedAspectran,DefaultEmbeddedAspectran
public interface EmbeddedAspectran extends com.aspectran.core.service.CoreServiceThe Interface EmbeddedAspectran.Created: 2017. 10. 28.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> Vexecute(java.util.concurrent.Callable<V> instantAction)Executes an instant activity.booleanisExposable(java.lang.String transletName)Returns whether or not the translet can be exposed to the daemon service.com.aspectran.core.adapter.SessionAdapternewSessionAdapter()Create and return a new session adapter from the embedded aspectran.voidrelease()Stop the service and release all allocated resources.java.lang.Stringrender(java.lang.String templateId)Renders the template without the supplied variables.java.lang.Stringrender(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap)Renders the template with the given parameters.java.lang.Stringrender(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given parameters and attributes.java.lang.Stringrender(java.lang.String templateId, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given attributes.static EmbeddedAspectranrun(com.aspectran.core.context.config.AspectranConfig aspectranConfig)Creates and starts a newDefaultEmbeddedAspectran.static EmbeddedAspectranrun(java.io.File aspectranConfigFile)Creates and starts a newDefaultEmbeddedAspectran.static EmbeddedAspectranrun(java.io.Reader configFileReader)Creates and starts a newDefaultEmbeddedAspectran.static EmbeddedAspectranrun(java.lang.String aspectranConfigFile)Creates and starts a newDefaultEmbeddedAspectran.com.aspectran.core.activity.Translettranslate(java.lang.String name)Executes the translet.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given parameters and attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method)Executes the translet without the supplied variables.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap, java.lang.String body)Executes the translet with the given parameters and attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name, java.lang.String body)Executes the translet.com.aspectran.core.activity.Translettranslate(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given parameters.-
Methods inherited from interface com.aspectran.core.service.CoreService
getActivityContext, getAspectranClassLoader, getAspectranConfig, getBasePath, getDefaultActivity, getSchedulerService, getServiceController, isDerived, isHardReload, isLateStart, joinDerivedService, leaveFromRootService, withdrawDerivedService
-
-
-
-
Method Detail
-
isExposable
boolean isExposable(java.lang.String transletName)
Returns whether or not the translet can be exposed to the daemon service.- Parameters:
transletName- the name of the translet to check- Returns:
- true if the translet can be exposed; false otherwise
-
newSessionAdapter
com.aspectran.core.adapter.SessionAdapter newSessionAdapter()
Create and return a new session adapter from the embedded aspectran.- Returns:
- the session adapter
-
execute
<V> V execute(java.util.concurrent.Callable<V> instantAction)
Executes an instant activity.- Parameters:
instantAction- the instant action- Returns:
- An object that is the result of performing an instant activity
- Since:
- 6.5.1
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name)
Executes the translet.- Parameters:
name- the translet name- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, java.lang.String body)Executes the translet.- Parameters:
name- the translet namebody- the request body- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.- Parameters:
name- the translet nameparameterMap- the parameter map- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given parameters and attributes.- Parameters:
name- the translet nameparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given parameters.- Parameters:
name- the translet nameattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method)Executes the translet without the supplied variables.- Parameters:
name- the translet namemethod- the request method- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.- Parameters:
name- the translet namemethod- the request methodparameterMap- the parameter map- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given attributes.- Parameters:
name- the translet namemethod- the request methodattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap, java.lang.String body)Executes the translet with the given parameters and attributes.- Parameters:
name- the translet namemethod- the request methodparameterMap- the parameter mapattributeMap- the attribute mapbody- the request body- Returns:
- the
Transletobject
-
render
java.lang.String render(java.lang.String templateId)
Renders the template without the supplied variables.- Parameters:
templateId- the template id- Returns:
- the output string of the template
-
render
java.lang.String render(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap)Renders the template with the given parameters.- Parameters:
templateId- the template idparameterMap- the parameter map- Returns:
- the output string of the template
-
render
java.lang.String render(java.lang.String templateId, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given attributes.- Parameters:
templateId- the template idattributeMap- the attribute map- Returns:
- the output string of the template
-
render
java.lang.String render(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given parameters and attributes.- Parameters:
templateId- the template idparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the output string of the template
-
release
void release()
Stop the service and release all allocated resources.
-
run
static EmbeddedAspectran run(java.lang.String aspectranConfigFile)
Creates and starts a newDefaultEmbeddedAspectran.- Parameters:
aspectranConfigFile- the aspectran configuration file- Returns:
- the instance of
EmbeddedAspectran
-
run
static EmbeddedAspectran run(java.io.File aspectranConfigFile)
Creates and starts a newDefaultEmbeddedAspectran.- Parameters:
aspectranConfigFile- the aspectran configuration file- Returns:
- the instance of
EmbeddedAspectran
-
run
static EmbeddedAspectran run(java.io.Reader configFileReader)
Creates and starts a newDefaultEmbeddedAspectran.- Parameters:
configFileReader- the aspectran configuration file reader- Returns:
- the instance of
EmbeddedAspectran
-
run
static EmbeddedAspectran run(com.aspectran.core.context.config.AspectranConfig aspectranConfig)
Creates and starts a newDefaultEmbeddedAspectran.- Parameters:
aspectranConfig- the parameters for aspectran configuration- Returns:
- the instance of
EmbeddedAspectran
-
-