Search in sources :

Example 1 with GatewayEventSubstitutionFilter

use of org.apache.geode.cache.wan.GatewayEventSubstitutionFilter in project geode by apache.

the class CacheXmlParser method endGatewayEventSubstitutionFilter.

private void endGatewayEventSubstitutionFilter() {
    Declarable d = createDeclarable();
    if (!(d instanceof GatewayEventSubstitutionFilter)) {
        throw new CacheXmlException(LocalizedStrings.CacheXmlParser_A_0_IS_NOT_AN_INSTANCE_OF_A_1.toLocalizedString(new Object[] { d.getClass().getName(), "GatewayEventSubstitutionFilter" }));
    }
    Object obj = stack.peek();
    if (obj instanceof GatewaySenderFactory) {
        GatewaySenderFactory senderFactory = (GatewaySenderFactory) obj;
        senderFactory.setGatewayEventSubstitutionFilter((GatewayEventSubstitutionFilter) d);
    } else if (obj instanceof AsyncEventQueueCreation) {
        AsyncEventQueueCreation asyncEventQueueCreation = (AsyncEventQueueCreation) obj;
        asyncEventQueueCreation.setGatewayEventSubstitutionFilter((GatewayEventSubstitutionFilter) d);
    } else {
        throw new CacheXmlException(LocalizedStrings.CacheXmlParser_A_0_MUST_BE_DEFINED_IN_THE_CONTEXT_OF_GATEWAY_SENDER_OR_ASYNC_EVENT_QUEUE.toLocalizedString("GatewayEventSubstitutionFilter"));
    }
}
Also used : Declarable(org.apache.geode.cache.Declarable) CacheXmlException(org.apache.geode.cache.CacheXmlException) GatewaySenderFactory(org.apache.geode.cache.wan.GatewaySenderFactory) GatewayEventSubstitutionFilter(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter)

Aggregations

CacheXmlException (org.apache.geode.cache.CacheXmlException)1 Declarable (org.apache.geode.cache.Declarable)1 GatewayEventSubstitutionFilter (org.apache.geode.cache.wan.GatewayEventSubstitutionFilter)1 GatewaySenderFactory (org.apache.geode.cache.wan.GatewaySenderFactory)1