public class RefreshAccessToken extends AbstractConnector
Modifier and Type | Field and Description |
---|---|
protected static String |
PROPERTY_PREFIX |
Constructor and Description |
---|
RefreshAccessToken() |
Modifier and Type | Method and Description |
---|---|
void |
connect(org.apache.synapse.MessageContext messageContext)
implements the connection logic to external API or custom service pattern
|
protected void |
extractAndSetPropertyAndRegistryResource(org.apache.synapse.MessageContext messageContext,
org.apache.http.client.methods.CloseableHttpResponse httpResponse,
org.apache.synapse.registry.Registry registry,
String accessTokenRegistryPath) |
protected String |
getRefreshUrl(org.apache.synapse.MessageContext messageContext) |
protected void |
handleRefresh(org.apache.synapse.MessageContext messageContext,
org.apache.synapse.registry.Registry registry,
String accessTokenRegistryPath) |
protected boolean |
reuseSavedAccessToken(org.apache.synapse.MessageContext messageContext,
org.apache.synapse.registry.Registry registry,
String accessTokenRegistryPath) |
getParameter, mediate
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAltering, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMediatorName, getMediatorPosition, getShortDescription, getTraceState, getType, isContentAltering, isContentAware, reportCloseStatistics, reportOpenStatistics, setComponentStatisticsId, setMediatorPosition, setShortDescription, setTraceState
protected static final String PROPERTY_PREFIX
public void connect(org.apache.synapse.MessageContext messageContext) throws ConnectException
Connector
connect
in interface Connector
connect
in class AbstractConnector
ConnectException
- when error during conenction to APIs or unexpected errorsprotected boolean reuseSavedAccessToken(org.apache.synapse.MessageContext messageContext, org.apache.synapse.registry.Registry registry, String accessTokenRegistryPath)
messageContext
- registry
- accessTokenRegistryPath
- protected void handleRefresh(org.apache.synapse.MessageContext messageContext, org.apache.synapse.registry.Registry registry, String accessTokenRegistryPath) throws ConnectException
ConnectException
protected String getRefreshUrl(org.apache.synapse.MessageContext messageContext)
protected void extractAndSetPropertyAndRegistryResource(org.apache.synapse.MessageContext messageContext, org.apache.http.client.methods.CloseableHttpResponse httpResponse, org.apache.synapse.registry.Registry registry, String accessTokenRegistryPath) throws IOException
IOException
Copyright © 2020 WSO2. All rights reserved.