Package org.apache.synapse.endpoints
Class HTTPEndpoint
- java.lang.Object
-
- org.apache.synapse.FaultHandler
-
- org.apache.synapse.endpoints.AbstractEndpoint
-
- org.apache.synapse.endpoints.HTTPEndpoint
-
- All Implemented Interfaces:
Endpoint
,ManagedLifecycle
,Nameable
,PropertyInclude
,SynapseArtifact
- Direct Known Subclasses:
BasicAuthConfiguredHTTPEndpoint
,OAuthConfiguredHTTPEndpoint
public class HTTPEndpoint extends AbstractEndpoint
-
-
Field Summary
Fields Modifier and Type Field Description static String
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 HTTPEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createJsonRepresentation()
void
executeEpTypeSpecificFunctions(MessageContext synCtx)
String
getHttpMethod()
SynapseXPath
getHttpMethodExpression()
String
getHttpVersion()
String
getServerPushSequence()
com.damnhandy.uri.template.UriTemplate
getUriTemplate()
boolean
isLegacySupport()
void
onFault(MessageContext synCtx)
On a fault, propagate to parent if any, or call into the fault handlervoid
onSuccess()
The SynapseCallback Receiver notifies an endpoint, if a message was successfully processed to give it a chance to clear up or reset its state to activeprotected void
processUrlTemplate(MessageContext synCtx)
protected String
resolveUrlTemplate(MessageContext synCtx)
void
send(MessageContext synCtx)
Sends the message context according to an endpoint specific behavior.void
setHttpMethod(String httpMethod)
void
setHttpMethodExpression(SynapseXPath httpMethodExpression)
void
setHttpVersion(String httpVersion)
void
setLegacySupport(boolean legacySupport)
void
setServerPushSequence(String serverPushSequence)
void
setUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
-
Methods inherited from class org.apache.synapse.endpoints.AbstractEndpoint
addProperties, addProperty, destroy, evaluateProperties, getArtifactContainerName, getChildren, getCommentsList, getContext, getDefinition, getDescription, getEndpointChildrenAsJson, getErrorHandler, getFileName, getIsEdited, getJsonRepresentation, getMetricsMBean, getName, getParentEndpoint, getProperties, getProperty, getReportingName, getValue, 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, setValue, toString, traceOrDebug
-
Methods inherited from class org.apache.synapse.FaultHandler
executeExtendedSynapseHandlerOnFault, getStackTrace, handleFault, handleFault
-
-
-
-
Field Detail
-
legacyPrefix
public static String legacyPrefix
-
-
Method Detail
-
onFault
public void onFault(MessageContext synCtx)
Description copied from class:AbstractEndpoint
On a fault, propagate to parent if any, or call into the fault handler- Overrides:
onFault
in classAbstractEndpoint
- Parameters:
synCtx
- the message at hand
-
onSuccess
public void onSuccess()
Description copied from class:AbstractEndpoint
The SynapseCallback Receiver notifies an endpoint, if a message was successfully processed to give it a chance to clear up or reset its state to active- Specified by:
onSuccess
in interfaceEndpoint
- Overrides:
onSuccess
in classAbstractEndpoint
-
createJsonRepresentation
protected void createJsonRepresentation()
- Specified by:
createJsonRepresentation
in classAbstractEndpoint
-
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 classAbstractEndpoint
- Parameters:
synCtx
- MessageContext to be sent.
-
executeEpTypeSpecificFunctions
public void executeEpTypeSpecificFunctions(MessageContext synCtx)
- Overrides:
executeEpTypeSpecificFunctions
in classAbstractEndpoint
-
processUrlTemplate
protected void processUrlTemplate(MessageContext synCtx) throws com.damnhandy.uri.template.VariableExpansionException
- Throws:
com.damnhandy.uri.template.VariableExpansionException
-
resolveUrlTemplate
protected String resolveUrlTemplate(MessageContext synCtx) throws com.damnhandy.uri.template.VariableExpansionException
- Throws:
com.damnhandy.uri.template.VariableExpansionException
-
getHttpMethod
public String getHttpMethod()
-
setHttpMethod
public void setHttpMethod(String httpMethod)
-
getUriTemplate
public com.damnhandy.uri.template.UriTemplate getUriTemplate()
-
getHttpMethodExpression
public SynapseXPath getHttpMethodExpression()
-
setUriTemplate
public void setUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
-
setHttpMethodExpression
public void setHttpMethodExpression(SynapseXPath httpMethodExpression)
-
isLegacySupport
public boolean isLegacySupport()
-
setLegacySupport
public void setLegacySupport(boolean legacySupport)
-
getHttpVersion
public String getHttpVersion()
-
setHttpVersion
public void setHttpVersion(String httpVersion)
-
getServerPushSequence
public String getServerPushSequence()
-
setServerPushSequence
public void setServerPushSequence(String serverPushSequence)
-
-