Package cn.ucloud.common.middleware
Class BaseMiddleware
java.lang.Object
cn.ucloud.common.middleware.BaseMiddleware
- All Implemented Interfaces:
Middleware
- Direct Known Subclasses:
CredentialMiddleware,LogMiddleware,ValidationMiddleware
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleException(Context context) Handle the context includes exception objecthandleRequest(Context context) Handle the context includes request objecthandleResponse(Context context) Handle the context includes response object
-
Constructor Details
-
BaseMiddleware
public BaseMiddleware()
-
-
Method Details
-
handleRequest
Description copied from interface:MiddlewareHandle the context includes request object- Specified by:
handleRequestin interfaceMiddleware- Parameters:
context- Context of invoking lifecycle- Returns:
- request object that modified
- Throws:
UCloudException- the exception during invoking
-
handleResponse
Description copied from interface:MiddlewareHandle the context includes response object- Specified by:
handleResponsein interfaceMiddleware- Parameters:
context- Context of invoking lifecycle- Returns:
- response object that modified
- Throws:
UCloudException- the exception during invoking
-
handleException
Description copied from interface:MiddlewareHandle the context includes exception object- Specified by:
handleExceptionin interfaceMiddleware- Parameters:
context- Context of invoking lifecycle- Throws:
UCloudException- the exception during invoking
-