Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2019 envimate GmbH - https://envimate.com/.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.envimate.httpmate.events;
import com.envimate.httpmate.chains.*;
import com.envimate.httpmate.events.mapper.EventToResponseMapper;
import com.envimate.httpmate.events.mapper.RequestToEventMapper;
import com.envimate.httpmate.filtermap.FilterMapBuilder;
import com.envimate.httpmate.generator.GenerationCondition;
import com.envimate.httpmate.generator.Generator;
import com.envimate.messageMate.messageBus.MessageBus;
import com.envimate.messageMate.processingContext.EventType;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import java.util.*;
import java.util.function.Predicate;
import static com.envimate.httpmate.HttpMateChains.*;
import static com.envimate.httpmate.chains.ChainRegistry.CHAIN_REGISTRY;
import static com.envimate.httpmate.chains.MetaData.emptyMetaData;
import static com.envimate.httpmate.chains.MetaDataKey.metaDataKey;
import static com.envimate.httpmate.chains.rules.Drop.drop;
import static com.envimate.httpmate.chains.rules.Jump.jumpTo;
import static com.envimate.httpmate.events.EventsChains.*;
import static com.envimate.httpmate.events.mapper.RequestToEventMapper.byDirectlyMappingAllData;
import static com.envimate.httpmate.events.processors.DetermineEventProcessor.determineEventProcessor;
import static com.envimate.httpmate.events.processors.DispatchEventProcessor.dispatchEventProcessor;
import static com.envimate.httpmate.events.processors.HandleExternalEventProcessor.handleExternalEventProcessor;
import static com.envimate.httpmate.events.processors.MapToEventProcessor.mapToEventProcessor;
import static com.envimate.httpmate.events.processors.SerializationProcessor.serializationProcessor;
import static com.envimate.httpmate.events.processors.UnwrapDispatchingExceptionProcessor.unwrapDispatchingExceptionProcessor;
import static com.envimate.httpmate.filtermap.FilterMapBuilder.filterMapBuilder;
import static com.envimate.httpmate.generator.Generator.generator;
import static com.envimate.httpmate.generator.Generators.generators;
import static com.envimate.httpmate.util.Validators.validateNotNull;
import static java.util.Optional.of;
@ToString
@EqualsAndHashCode
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public final class EventModule implements ChainModule {
public static final MetaDataKey MESSAGE_BUS = metaDataKey("MESSAGE_BUS");
public static final MetaDataKey IS_EXTERNAL_EVENT = metaDataKey("IS_EXTERNAL_EVENT");
public static final MetaDataKey EVENT_TYPE = metaDataKey("EVENT_TYPE");
public static final MetaDataKey