All Downloads are FREE. Search and download functionalities are using the official Maven repository.

calculator.engine.handler.HandleEnvironment Maven / Gradle / Ivy

There is a newer version: 2.0.0-RC1
Show newest version
/*
 * 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 calculator.engine.handler;

import calculator.engine.ObjectMapper;
import calculator.engine.annotation.Internal;
import calculator.engine.script.ScriptEvaluator;
import graphql.ExecutionResult;
import graphql.execution.instrumentation.parameters.InstrumentationFieldCompleteParameters;
import graphql.language.Directive;

import java.util.concurrent.Executor;

@Internal
public class HandleEnvironment {

    private final Directive directive;
    private final ExecutionResult result;
    private final InstrumentationFieldCompleteParameters parameters;
    private final Executor executor;
    private final ObjectMapper objectMapper;
    private final ScriptEvaluator scriptEvaluator;

    public HandleEnvironment(Directive directive,
                             ExecutionResult result,
                             InstrumentationFieldCompleteParameters parameters,
                             Executor executor,
                             ObjectMapper objectMapper,
                             ScriptEvaluator scriptEvaluator) {
        this.directive = directive;
        this.result = result;
        this.parameters = parameters;
        this.executor = executor;
        this.objectMapper = objectMapper;
        this.scriptEvaluator = scriptEvaluator;
    }

    public Directive getDirective() {
        return directive;
    }

    public ExecutionResult getResult() {
        return result;
    }

    public InstrumentationFieldCompleteParameters getParameters() {
        return parameters;
    }

    public Executor getExecutor() {
        return executor;
    }

    public ObjectMapper getObjectMapper() {
        return objectMapper;
    }

    public ScriptEvaluator getScriptEvaluator() {
        return scriptEvaluator;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy