Package org.apache.synapse.api
Class API
- java.lang.Object
-
- org.apache.synapse.api.AbstractRequestProcessor
-
- org.apache.synapse.api.API
-
- All Implemented Interfaces:
AspectConfigurable
,ManagedLifecycle
,SynapseArtifact
public class API extends AbstractRequestProcessor implements ManagedLifecycle, AspectConfigurable, SynapseArtifact
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.api.AbstractRequestProcessor
log, name
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllBindsTo(Set<String> inboundEndpointBindings)
void
addBindsTo(String inboundEndpointName)
void
addHandler(Handler handler)
void
addResource(Resource resource)
boolean
canProcess(MessageContext synCtx)
void
configure(AspectConfiguration aspectConfiguration)
Configure aspects according to the given configurationvoid
destroy()
This method should implement the destroying of the implemented parts of the configuration.String
getAPIName()
String
getArtifactContainerName()
AspectConfiguration
getAspectConfiguration()
Get the aspects configurationSet<String>
getBindsTo()
List<String>
getCommentsList()
String
getContext()
String
getDescription()
Retrieves the description of the artifactString
getFileName()
Handler[]
getHandlers()
String
getHost()
String
getName()
Get the fully qualified name of this APIint
getPort()
int
getProtocol()
Resource
getResource(String resourceName)
Resource[]
getResources()
Map<String,Resource>
getResourcesMap()
String
getSwaggerResourcePath()
String
getVersion()
VersionStrategy
getVersionStrategy()
void
init(SynapseEnvironment se)
This method should implement the initialization of the implemented parts of the configuration.boolean
isEdited()
void
process(MessageContext synCtx)
void
setArtifactContainerName(String name)
void
setCommentsList(List<String> commentsList)
void
setComponentStatisticsId(ArtifactHolder holder)
void
setContext(String context)
void
setDescription(String description)
Set the description of the artifactvoid
setFileName(String fileName)
void
setHost(String host)
void
setIsEdited(boolean isEdited)
void
setLogSetterValue()
void
setPort(int port)
void
setProtocol(int protocol)
void
setSwaggerResourcePath(String swaggerResourcePath)
void
setVersionStrategy(VersionStrategy versionStrategy)
-
Methods inherited from class org.apache.synapse.api.AbstractRequestProcessor
handleException, handleException
-
-
-
-
Method Detail
-
setContext
public void setContext(String context)
-
setArtifactContainerName
public void setArtifactContainerName(String name)
-
getArtifactContainerName
public String getArtifactContainerName()
-
isEdited
public boolean isEdited()
-
setIsEdited
public void setIsEdited(boolean isEdited)
-
setLogSetterValue
public void setLogSetterValue()
-
getName
public String getName()
Get the fully qualified name of this API- Returns:
- returns the key combination for API NAME + VERSION
-
getProtocol
public int getProtocol()
-
setProtocol
public void setProtocol(int protocol)
-
getAPIName
public String getAPIName()
-
getVersion
public String getVersion()
-
getContext
public String getContext()
-
getHost
public String getHost()
-
setHost
public void setHost(String host)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
getSwaggerResourcePath
public String getSwaggerResourcePath()
-
setSwaggerResourcePath
public void setSwaggerResourcePath(String swaggerResourcePath)
-
addResource
public void addResource(Resource resource)
-
getResources
public Resource[] getResources()
-
addHandler
public void addHandler(Handler handler)
-
getHandlers
public Handler[] getHandlers()
-
addBindsTo
public void addBindsTo(String inboundEndpointName)
-
canProcess
public boolean canProcess(MessageContext synCtx)
-
process
public void process(MessageContext synCtx)
-
init
public void init(SynapseEnvironment se)
Description copied from interface:ManagedLifecycle
This method should implement the initialization of the implemented parts of the configuration.- Specified by:
init
in interfaceManagedLifecycle
- Parameters:
se
- SynapseEnvironment to be used for initialization
-
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
-
getVersionStrategy
public VersionStrategy getVersionStrategy()
-
setVersionStrategy
public void setVersionStrategy(VersionStrategy versionStrategy)
-
configure
public void configure(AspectConfiguration aspectConfiguration)
Description copied from interface:AspectConfigurable
Configure aspects according to the given configuration- Specified by:
configure
in interfaceAspectConfigurable
- Parameters:
aspectConfiguration
- AspectConfiguration instance
-
getAspectConfiguration
public AspectConfiguration getAspectConfiguration()
Description copied from interface:AspectConfigurable
Get the aspects configuration- Specified by:
getAspectConfiguration
in interfaceAspectConfigurable
- Returns:
- AspectConfiguration instance
-
setComponentStatisticsId
public void setComponentStatisticsId(ArtifactHolder holder)
-
setDescription
public void setDescription(String description)
Description copied from interface:SynapseArtifact
Set the description of the artifact- Specified by:
setDescription
in interfaceSynapseArtifact
- Parameters:
description
- tobe set to the artifact
-
getDescription
public String getDescription()
Description copied from interface:SynapseArtifact
Retrieves the description of the artifact- Specified by:
getDescription
in interfaceSynapseArtifact
- Returns:
- description of the artifact
-
-