Class IntegrationKeyExtractorTemplate
java.lang.Object
de.hybris.platform.odata2services.odata.monitoring.impl.IntegrationKeyExtractorTemplate
- All Implemented Interfaces:
IntegrationKeyExtractor
- Direct Known Subclasses:
JsonIntegrationKeyExtractor,XmlIntegrationKeyExtractor
public abstract class IntegrationKeyExtractorTemplate
extends Object
implements IntegrationKeyExtractor
Base flow for extracting integration key values
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringDecodes value.extractIntegrationKey(String responseBody, int statusCode) Extracts integration key from the provided response body.protected abstract StringextractIntegrationKeyFromNonEmptyBody(String responseBody, int statusCode) Extracts integration key from the response body in a way specific to the implemenation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.odata2services.odata.monitoring.IntegrationKeyExtractor
isApplicable
-
Constructor Details
-
IntegrationKeyExtractorTemplate
public IntegrationKeyExtractorTemplate()
-
-
Method Details
-
extractIntegrationKey
Extracts integration key from the provided response body. If response body is not empty ornull, then it's passed toextractIntegrationKeyFromNonEmptyBody(String, int), which extracts integration key from the specific response structure. Then the extracted value is decoded bydecode(String)method.- Specified by:
extractIntegrationKeyin interfaceIntegrationKeyExtractor- Parameters:
responseBody- response body to extract the integrationKey value fromstatusCode- status code of the response, which may be important when response body has different structure for different response statuses.- Returns:
- extracted value
-
extractIntegrationKeyFromNonEmptyBody
protected abstract String extractIntegrationKeyFromNonEmptyBody(String responseBody, int statusCode) Extracts integration key from the response body in a way specific to the implemenation.- Parameters:
responseBody- response body to be parsed.statusCode- status code of the response.- Returns:
- integration key value.
-
decode
Decodes value. This method usesURLDecoderfor decoding.- Parameters:
value- an integration key value to be decoded.- Returns:
- decoded value.
-