public class MessageCapture extends Object
Constructor and Description |
---|
MessageCapture(Logger logger,
boolean captureEntity)
Builds a MessageCapture that will prints messages in the provided
logger . |
MessageCapture(Logger logger,
boolean captureEntity,
boolean captureExchange)
Builds a MessageCapture that will prints messages in the provided
logger . |
Modifier and Type | Method and Description |
---|---|
void |
capture(Exchange exchange,
CapturePoint mode)
Captures the given exchanges, in the given mode.
|
public MessageCapture(Logger logger, boolean captureEntity)
logger
.logger
- where to write captured messagescaptureEntity
- capture the entity content (if not binary)public MessageCapture(Logger logger, boolean captureEntity, boolean captureExchange)
logger
.logger
- where to write captured messagescaptureEntity
- capture the entity content (if not binary)captureExchange
- capture the exchange content (excluding request and response object) as jsonpublic void capture(Exchange exchange, CapturePoint mode) throws IOException
exchange
- contains the captured messagesmode
- one of CapturePoint.REQUEST
, CapturePoint.FILTERED_REQUEST
,
CapturePoint.FILTERED_RESPONSE
or CapturePoint.RESPONSE
IOException
- if the entity content could not be printCopyright © 2014 ForgeRock AS. All rights reserved.