Interface ExchangeStore
- All Known Implementing Classes:
AbstractExchangeStore,ElasticSearchExchangeStore,FileExchangeStore,ForgetfulExchangeStore,LimitedMemoryExchangeStore,MemoryExchangeStore
public interface ExchangeStore
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcollect(ExchangeCollector col) Object[]List<? extends ClientStatistics>getExchangeById(long id) getExchanges(RuleKey ruleKey) getFilteredSortedPaged(QueryParameter params, boolean useXForwardedForAsClientAddr) longintgetNumberOfExchanges(RuleKey ruleKey) getStatistics(RuleKey ruleKey) voidvoidnotifyListenersOnExchangeAdd(Rule rule, AbstractExchange exchange) voidvoidvoidremove(AbstractExchange exchange) voidremoveAllExchanges(AbstractExchange[] exchanges) voidremoveAllExchanges(Rule rule) voidvoidsnap(AbstractExchange exchange, Interceptor.Flow flow) Adds the current state of the exchange to the store.voidwaitForModification(long lastKnownModification) Returns immediately if lastKnownModification is smaller than last known modification.
-
Method Details
-
addExchangesStoreListener
-
removeExchangesStoreListener
-
refreshExchangeStoreListeners
void refreshExchangeStoreListeners() -
notifyListenersOnExchangeAdd
-
notifyListenersOnExchangeRemoval
-
snap
Adds the current state of the exchange to the store.Implementations should take a snapshot of the current state of the request (or response) headers and register a body observer in which they will be called back as soon as the body has fully been received.
If flow==REQUEST, the request is added. Elsewise, the response is added (if present).
-
remove
-
removeAllExchanges
-
removeAllExchanges
-
getExchanges
-
getNumberOfExchanges
-
getStatistics
-
getAllExchanges
Object[] getAllExchanges() -
getAllExchangesAsList
List<AbstractExchange> getAllExchangesAsList() -
getExchangeById
-
init
- Throws:
Exception
-
getClientStatistics
List<? extends ClientStatistics> getClientStatistics() -
collect
-
getLastModified
long getLastModified() -
waitForModification
Returns immediately if lastKnownModification is smaller than last known modification. Otherwise it waits until a modification occurs.- Throws:
InterruptedException
-
getFilteredSortedPaged
ExchangeQueryResult getFilteredSortedPaged(QueryParameter params, boolean useXForwardedForAsClientAddr) throws Exception - Throws:
Exception
-