Package org.chenile.core.interceptors
Class LogOutput
java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.core.interceptors.LogOutput
- All Implemented Interfaces:
Command<ChenileExchange>
Logs the output from the response object. This is required if the service is asynchronous i.e. its
response is not emitted back but needs to be used to keep track of success and failure by
logging the response into some medium (such as files, queues, topics etc.)
The original entry point (that constructed the ChenileExchange) can give us a callback to invoke or can ask us to log into a file. That can then be used to transmit the status to the original caller or displayed in a UI.
The original entry point (that constructed the ChenileExchange) can give us a callback to invoke or can ask us to log into a file. That can then be used to transmit the status to the original caller or displayed in a UI.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
bypassInterception
(ChenileExchange exchange) Over-ride this to bypass interception in special circumstancesprivate void
copyParamHeaders
(LogRecord record, ChenileExchange exchange) protected void
doPostProcessing
(ChenileExchange chenileExchange) Override this to do post processing.private LogRecord
makeLogRecord
(ChenileExchange exchange) Methods inherited from class org.chenile.core.interceptors.BaseChenileInterceptor
doContinue, doPreProcessing, execute, getExtensionByAnnotation, getExtensionByAnnotation, resumeFromSavedPoint, savePoint
-
Constructor Details
-
LogOutput
public LogOutput()
-
-
Method Details
-
doPostProcessing
Description copied from class:BaseChenileInterceptor
Override this to do post processing. This will be called even if there is an exception downstream. So make sure that if you don't want to do any processing in case of exception, check ifChenileExchange.getException()
returns null value. If you happen to throw an exception in this method, it will get added to the set of errors that would ultimately be returned. See alsoChenileExchange.setException(Throwable)
- Overrides:
doPostProcessing
in classBaseChenileInterceptor
- Parameters:
chenileExchange
- Chenile Exchange
-
makeLogRecord
-
copyParamHeaders
-
bypassInterception
Description copied from class:BaseChenileInterceptor
Over-ride this to bypass interception in special circumstances- Overrides:
bypassInterception
in classBaseChenileInterceptor
- Returns:
-