public class CacheMediator
extends org.wso2.carbon.mediator.service.ui.AbstractListMediator
Constructor and Description |
---|
CacheMediator() |
Modifier and Type | Method and Description |
---|---|
void |
build(org.apache.axiom.om.OMElement elem)
Creates the cache mediator with given configuration XML as OMElement.
|
String |
getDigestGenerator()
This method gives the DigestGenerator to evaluate the hash values of incoming messages.
|
String |
getHeadersToExcludeInHash()
This method gives array of headers that would be excluded when hashing.
|
String |
getHeadersToIncludeInHash()
This method gives array of headers that would be included when hashing.
|
String |
getHTTPMethodsToCache()
This method gives the HTTP method that needs to be cached.
|
int |
getInMemoryCacheSize()
This method gives the size of the messages to be cached in memory.
|
int |
getMaxMessageSize()
This method gives the maximum size of the messages to be cached in bytes.
|
String |
getOnCacheHitRef()
This method gives reference to the onCacheHit sequence to be executed.
|
String |
getProtocolType()
Returns the protocolType of the message.
|
String |
getResponseCodes()
Returns the response codes (regex expression).
|
String |
getTagLocalName()
This method gives the local name of the mediator.
|
long |
getTimeout()
This method gives the timeout period in milliseconds.
|
boolean |
isAddAgeHeaderEnabled()
This method returns whether an Age header need to be included in the cached response.
|
boolean |
isCacheControlEnabled()
This method returns whether cache-control headers need to be honored when caching.
|
boolean |
isCollector()
This method gives whether the mediator should be in the incoming path or in the outgoing path as a boolean.
|
org.apache.axiom.om.OMElement |
serialize(org.apache.axiom.om.OMElement parent) |
void |
setAddAgeHeaderEnabled(boolean addAgeHeaderEnabled)
This method sets whether an Age header need to be included in the cached response.
|
void |
setCacheControlEnabled(boolean cacheControlEnabled)
This method sets whether cache-control headers need to be honored when caching.
|
void |
setCollector(boolean collector)
This method sets whether the mediator should be in the incoming path or in the outgoing path as a boolean.
|
void |
setDigestGenerator(String digestGenerator)
This method sets the DigestGenerator to evaluate the hash values of incoming messages.
|
void |
setHeadersToExcludeInHash(String headersToExcludeInHash)
This method sets the array of headers that would be excluded when hashing.
|
void |
setHeadersToIncludeInHash(String headersToIncludeInHash)
This method sets the array of headers that would be included when hashing.
|
void |
setHTTPMethodsToCache(String hTTPMethodToCache)
This sets the HTTP method that needs to be cached.
|
void |
setInMemoryCacheSize(int inMemoryCacheSize)
This method sets the size of the messages to be cached in memory.
|
void |
setMaxMessageSize(int maxMessageSize)
This method sets the maximum size of the messages to be cached in bytes.
|
void |
setOnCacheHitRef(String onCacheHitRef)
This method sets reference to the onCacheHit sequence to be executed.
|
void |
setProtocolType(String protocolType)
This method sets protocolType of the messages.
|
void |
setResponseCodes(String responseCodes)
This method sets the response codes that needs to be cached.
|
void |
setTimeout(long timeout)
This method sets the timeout period as milliseconds.
|
addChild, addChildren, getChild, getList, removeChild, removeChild, serializeChildren
collectNameValuePairs, disableStatistics, enableStatistics, getMediatorProperties, getTraceState, isAuditConfigurable, isStatisticsEnable, processAuditStatus, saveTracingState, serializeMediatorProperties, serializeNamespaces, setAuditConfigurable, setTraceState
public boolean isCollector()
public void setCollector(boolean collector)
collector
- boolean value to be set as collector.public String getDigestGenerator()
public void setDigestGenerator(String digestGenerator)
digestGenerator
- Name of the digestGenerator to be set to evaluate hash values.public int getInMemoryCacheSize()
public void setInMemoryCacheSize(int inMemoryCacheSize)
inMemoryCacheSize
- value(number of bytes) to be set as memory cache size.public long getTimeout()
public void setTimeout(long timeout)
timeout
- millisecond timeout period to be set.public String getOnCacheHitRef()
public void setOnCacheHitRef(String onCacheHitRef)
onCacheHitRef
- reference to the onCacheHit sequence to be set.public int getMaxMessageSize()
public void setMaxMessageSize(int maxMessageSize)
maxMessageSize
- maximum size of the messages to be set in bytes.public String getTagLocalName()
public String getHTTPMethodsToCache()
public void setHTTPMethodsToCache(String hTTPMethodToCache)
hTTPMethodToCache
- the HTTP method to be cachedpublic String getProtocolType()
public void setProtocolType(String protocolType)
protocolType
- protocol type of the messages.public String getResponseCodes()
public void setResponseCodes(String responseCodes)
responseCodes
- the response codes to be cached in regex form.public String getHeadersToExcludeInHash()
public void setHeadersToExcludeInHash(String headersToExcludeInHash)
headersToExcludeInHash
- array of headers to exclude from hashing.public String getHeadersToIncludeInHash()
public void setHeadersToIncludeInHash(String headersToIncludeInHash)
headersToIncludeInHash
- array of headers to include in hashing.public boolean isCacheControlEnabled()
public void setCacheControlEnabled(boolean cacheControlEnabled)
cacheControlEnabled
- specifies whether cache-control headers need to be honored.public boolean isAddAgeHeaderEnabled()
public void setAddAgeHeaderEnabled(boolean addAgeHeaderEnabled)
addAgeHeaderEnabled
- specifies whether include an Age header or not.public org.apache.axiom.om.OMElement serialize(org.apache.axiom.om.OMElement parent)
public void build(org.apache.axiom.om.OMElement elem)
elem
- OMElement to be converted to cache mediator Object.Copyright © 2021 WSO2. All rights reserved.