public class GenerateAccessToken extends AbstractConnector
Modifier and Type | Field and Description |
---|---|
protected static String |
ACCEPT_ENCODING |
protected static String |
CACHE_CONTROL |
protected static String |
PRAGMA |
protected static String |
PROPERTY_PREFIX |
Constructor and Description |
---|
GenerateAccessToken() |
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,
String jsonResponse,
org.apache.synapse.registry.Registry registry,
String accessTokenRegistryPath) |
protected String |
getPostData(org.apache.synapse.MessageContext messageContext) |
protected void |
handleTokenGeneration(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
protected static final String ACCEPT_ENCODING
protected static final String CACHE_CONTROL
protected static final String PRAGMA
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 void handleTokenGeneration(org.apache.synapse.MessageContext messageContext, org.apache.synapse.registry.Registry registry, String accessTokenRegistryPath) throws ConnectException
ConnectException
protected String getPostData(org.apache.synapse.MessageContext messageContext)
protected void extractAndSetPropertyAndRegistryResource(org.apache.synapse.MessageContext messageContext, String jsonResponse, org.apache.synapse.registry.Registry registry, String accessTokenRegistryPath) throws IOException, ConnectException, org.json.JSONException
IOException
ConnectException
org.json.JSONException
Copyright © 2020 WSO2. All rights reserved.