Package com.aspectran.web.service
Interface WebService
- All Superinterfaces:
CoreService
- All Known Implementing Classes:
AbstractWebService
,DefaultWebService
The Interface WebService.
Created: 2017. 10. 28.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
bind
(WebActivity activity, WebService service) static void
bind
(jakarta.servlet.ServletContext servletContext, WebService service) static ActivityContext
findActivityContext
(jakarta.servlet.ServletContext servletContext) Finds the root web service from the ServletContext and returns its ActivityContext.static ActivityContext
findActivityContext
(jakarta.servlet.ServletRequest servletRequest) Finds the derived web service from the ServletRequest and returns its ActivityContext.static DefaultWebService
findWebService
(jakarta.servlet.ServletContext servletContext) Find the root web service from ServletContext.static DefaultWebService
findWebService
(jakarta.servlet.ServletRequest servletRequest) jakarta.servlet.ServletContext
Returns a reference to theServletContext
in which this WebService is running.boolean
void
service
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Executes web activity.Methods inherited from interface com.aspectran.core.service.CoreService
getActivityContext, getAltClassLoader, getApplicationAdapter, getAspectranConfig, getBasePath, getContextName, getDefaultActivity, getParentService, getRootService, getSchedulerService, getServiceClassLoader, getServiceLifeCycle, hasServiceClassLoader, isAcceptable, isDerived, isOrphan, isRootService
-
Field Details
-
ROOT_WEB_SERVICE_ATTR_NAME
ServletContext attribute name used to obtain the root WebService object. -
DERIVED_WEB_SERVICE_ATTR_NAME
ServletRequest attribute name used to obtain the derived WebService object.
-
-
Method Details
-
getServletContext
jakarta.servlet.ServletContext getServletContext()Returns a reference to theServletContext
in which this WebService is running.- Returns:
- a
ServletContext
object, used by this WebService to interact with its servlet container
-
isSessionAdaptable
boolean isSessionAdaptable() -
service
void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException Executes web activity.- Parameters:
request
- current HTTP servlet requestresponse
- current HTTP servlet response- Throws:
IOException
- If an error occurs during Activity execution
-
bind
-
bind
-
findWebService
Find the root web service from ServletContext.- Parameters:
servletContext
- ServletContext to find the root web service for- Returns:
- the root web service
-
findWebService
-
findActivityContext
Finds the root web service from the ServletContext and returns its ActivityContext.- Parameters:
servletContext
- ServletContext to find the root web service for- Returns:
- ActivityContext of root web service
-
findActivityContext
Finds the derived web service from the ServletRequest and returns its ActivityContext.- Parameters:
servletRequest
- ServletRequest to find the derived web service for- Returns:
- ActivityContext of derived web service
-