Package org.apache.synapse.endpoints
Class OAuthConfiguredHTTPEndpoint
- java.lang.Object
-
- org.apache.synapse.FaultHandler
-
- org.apache.synapse.endpoints.AbstractEndpoint
-
- org.apache.synapse.endpoints.HTTPEndpoint
-
- org.apache.synapse.endpoints.OAuthConfiguredHTTPEndpoint
-
- All Implemented Interfaces:
Endpoint
,ManagedLifecycle
,Nameable
,PropertyInclude
,SynapseArtifact
public class OAuthConfiguredHTTPEndpoint extends HTTPEndpoint
This class represents a http endpoint with oauth configured This will configure the oauth headers and call the send method in HTTP endpoint
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.endpoints.HTTPEndpoint
legacyPrefix
-
Fields inherited from class org.apache.synapse.endpoints.AbstractEndpoint
anonymous, artifactContainerName, CHILDREN_JSON_ATT, errorHandler, fileName, initialized, isClusteringEnabled, log, NAME_JSON_ATT, trace, TYPE_JSON_ATT
-
-
Constructor Summary
Constructors Constructor Description OAuthConfiguredHTTPEndpoint(AuthHandler authHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
This method should implement the destroying of the implemented parts of the configuration.OAuthHandler
getOauthHandler()
MessageContext
retryCallWithNewToken(MessageContext synCtx)
This method is called when we need to retry a call to the resource with a new tokenvoid
send(MessageContext synCtx)
Sends the message context according to an endpoint specific behavior.-
Methods inherited from class org.apache.synapse.endpoints.HTTPEndpoint
createJsonRepresentation, executeEpTypeSpecificFunctions, getHttpMethod, getHttpMethodExpression, getHttpVersion, getServerPushSequence, getUriTemplate, isLegacySupport, onFault, onSuccess, setHttpMethod, setHttpMethodExpression, setHttpVersion, setLegacySupport, setServerPushSequence, setUriTemplate
-
Methods inherited from class org.apache.synapse.endpoints.AbstractEndpoint
addProperties, addProperty, evaluateProperties, getArtifactContainerName, getChildren, getCommentsList, getContext, getDefinition, getDescription, getEndpointChildrenAsJson, getErrorHandler, getFileName, getIsEdited, getJsonRepresentation, getMetricsMBean, getName, getParentEndpoint, getProperties, getProperty, getReportingName, handleException, handleException, handleException, informFailure, init, isAnonymous, isInitialized, isLeafEndpoint, isRetry, isSuspendFault, isTimeout, isTraceOn, isTraceOrDebugOn, logOnChildEndpointFail, logSetter, onChildEndpointFail, prepareForEndpointStatistics, readyToSend, removeProperty, setAdvancedProperties, setAnonymous, setArtifactContainerName, setChildren, setCommentsList, setComponentStatisticsId, setContentAware, setDefinition, setDescription, setEnableMBeanStats, setErrorHandler, setErrorOnMessage, setFileName, setForceBuildMC, setIsEdited, setName, setParentEndpoint, toString, traceOrDebug
-
Methods inherited from class org.apache.synapse.FaultHandler
executeExtendedSynapseHandlerOnFault, getStackTrace, handleFault, handleFault
-
-
-
-
Constructor Detail
-
OAuthConfiguredHTTPEndpoint
public OAuthConfiguredHTTPEndpoint(AuthHandler authHandler)
-
-
Method Detail
-
send
public void send(MessageContext synCtx)
Description copied from interface:Endpoint
Sends the message context according to an endpoint specific behavior.- Specified by:
send
in interfaceEndpoint
- Overrides:
send
in classHTTPEndpoint
- Parameters:
synCtx
- MessageContext to be sent.
-
retryCallWithNewToken
public MessageContext retryCallWithNewToken(MessageContext synCtx)
This method is called when we need to retry a call to the resource with a new token- Parameters:
synCtx
- Original Synapse MessageContext that went through this endpoint- Returns:
- MessageContext response obtained after a retry
-
destroy
public void destroy()
Description copied from interface:ManagedLifecycle
This method should implement the destroying of the implemented parts of the configuration.- Specified by:
destroy
in interfaceManagedLifecycle
- Overrides:
destroy
in classAbstractEndpoint
-
getOauthHandler
public OAuthHandler getOauthHandler()
-
-