use of com.predic8.membrane.core.model.IExchangesStoreListener in project service-proxy by membrane.
the class AbstractExchangeStore method notifyListenersOnExchangeRemoval.
public void notifyListenersOnExchangeRemoval(AbstractExchange exchange) {
for (IExchangesStoreListener listener : exchangesStoreListeners) {
exchange.removeExchangeStoreListener(listener);
listener.removeExchange(exchange);
}
}
use of com.predic8.membrane.core.model.IExchangesStoreListener in project service-proxy by membrane.
the class AbstractExchangeStore method notifyListenersOnExchangeAdd.
public void notifyListenersOnExchangeAdd(Rule rule, AbstractExchange exchange) {
for (IExchangesStoreListener listener : exchangesStoreListeners) {
exchange.addExchangeStoreListener(listener);
listener.addExchange(rule, exchange);
}
}
use of com.predic8.membrane.core.model.IExchangesStoreListener in project service-proxy by membrane.
the class MemoryExchangeStore method snap.
public void snap(AbstractExchange exc, Flow flow) {
if (flow != Flow.REQUEST)
return;
if (isKeyInStore(exc)) {
getKeyList(exc).add(exc);
} else {
List<AbstractExchange> list = new Vector<AbstractExchange>();
list.add(exc);
exchangesMap.put(exc.getRule().getKey(), list);
}
totals.add(exc);
for (IExchangesStoreListener listener : exchangesStoreListeners) {
exc.addExchangeStoreListener(listener);
listener.addExchange(exc.getRule(), exc);
}
}
use of com.predic8.membrane.core.model.IExchangesStoreListener in project service-proxy by membrane.
the class MemoryExchangeStore method removeAllExchanges.
public void removeAllExchanges(Rule rule) {
AbstractExchange[] exchanges = getExchanges(rule.getKey());
exchangesMap.remove(rule.getKey());
totals.removeAll(Arrays.asList(exchanges));
for (IExchangesStoreListener listener : exchangesStoreListeners) {
listener.removeExchanges(rule, exchanges);
}
}
Aggregations