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

com.google.cloud.dialogflow.cx.v3beta1.stub.GrpcTestCasesStub Maven / Gradle / Ivy

Go to download

provides a new way of designing agents, taking a state machine approach to agent design. This gives you clear and explicit control over a conversation, a better end-user experience, and a better development workflow.

There is a newer version: 0.60.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed 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
 *
 *      https://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.google.cloud.dialogflow.cx.v3beta1.stub;

import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListLocationsPagedResponse;
import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCaseResultsPagedResponse;
import static com.google.cloud.dialogflow.cx.v3beta1.TestCasesClient.ListTestCasesPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest;
import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata;
import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest;
import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse;
import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest;
import com.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse;
import com.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata;
import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse;
import com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest;
import com.google.cloud.dialogflow.cx.v3beta1.GetTestCaseResultRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata;
import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse;
import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse;
import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest;
import com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse;
import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata;
import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest;
import com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse;
import com.google.cloud.dialogflow.cx.v3beta1.TestCase;
import com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult;
import com.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the TestCases service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @BetaApi @Generated("by gapic-generator-java") public class GrpcTestCasesStub extends TestCasesStub { private static final MethodDescriptor listTestCasesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ListTestCases") .setRequestMarshaller( ProtoUtils.marshaller(ListTestCasesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTestCasesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor batchDeleteTestCasesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.dialogflow.cx.v3beta1.TestCases/BatchDeleteTestCases") .setRequestMarshaller( ProtoUtils.marshaller(BatchDeleteTestCasesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); private static final MethodDescriptor getTestCaseMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/GetTestCase") .setRequestMarshaller(ProtoUtils.marshaller(GetTestCaseRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) .build(); private static final MethodDescriptor createTestCaseMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/CreateTestCase") .setRequestMarshaller( ProtoUtils.marshaller(CreateTestCaseRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) .build(); private static final MethodDescriptor updateTestCaseMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/UpdateTestCase") .setRequestMarshaller( ProtoUtils.marshaller(UpdateTestCaseRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TestCase.getDefaultInstance())) .build(); private static final MethodDescriptor runTestCaseMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/RunTestCase") .setRequestMarshaller(ProtoUtils.marshaller(RunTestCaseRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor batchRunTestCasesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/BatchRunTestCases") .setRequestMarshaller( ProtoUtils.marshaller(BatchRunTestCasesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor calculateCoverageMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/CalculateCoverage") .setRequestMarshaller( ProtoUtils.marshaller(CalculateCoverageRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CalculateCoverageResponse.getDefaultInstance())) .build(); private static final MethodDescriptor importTestCasesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ImportTestCases") .setRequestMarshaller( ProtoUtils.marshaller(ImportTestCasesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor exportTestCasesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ExportTestCases") .setRequestMarshaller( ProtoUtils.marshaller(ExportTestCasesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listTestCaseResultsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/ListTestCaseResults") .setRequestMarshaller( ProtoUtils.marshaller(ListTestCaseResultsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTestCaseResultsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getTestCaseResultMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.TestCases/GetTestCaseResult") .setRequestMarshaller( ProtoUtils.marshaller(GetTestCaseResultRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(TestCaseResult.getDefaultInstance())) .build(); private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/ListLocations") .setRequestMarshaller( ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getLocationMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) .build(); private final UnaryCallable listTestCasesCallable; private final UnaryCallable listTestCasesPagedCallable; private final UnaryCallable batchDeleteTestCasesCallable; private final UnaryCallable getTestCaseCallable; private final UnaryCallable createTestCaseCallable; private final UnaryCallable updateTestCaseCallable; private final UnaryCallable runTestCaseCallable; private final OperationCallable runTestCaseOperationCallable; private final UnaryCallable batchRunTestCasesCallable; private final OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> batchRunTestCasesOperationCallable; private final UnaryCallable calculateCoverageCallable; private final UnaryCallable importTestCasesCallable; private final OperationCallable< ImportTestCasesRequest, ImportTestCasesResponse, ImportTestCasesMetadata> importTestCasesOperationCallable; private final UnaryCallable exportTestCasesCallable; private final OperationCallable< ExportTestCasesRequest, ExportTestCasesResponse, ExportTestCasesMetadata> exportTestCasesOperationCallable; private final UnaryCallable listTestCaseResultsCallable; private final UnaryCallable listTestCaseResultsPagedCallable; private final UnaryCallable getTestCaseResultCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcTestCasesStub create(TestCasesStubSettings settings) throws IOException { return new GrpcTestCasesStub(settings, ClientContext.create(settings)); } public static final GrpcTestCasesStub create(ClientContext clientContext) throws IOException { return new GrpcTestCasesStub(TestCasesStubSettings.newBuilder().build(), clientContext); } public static final GrpcTestCasesStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcTestCasesStub( TestCasesStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so * that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected GrpcTestCasesStub(TestCasesStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcTestCasesCallableFactory()); } /** * Constructs an instance of GrpcTestCasesStub, using the given settings. This is protected so * that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected GrpcTestCasesStub( TestCasesStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings listTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCasesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings batchDeleteTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteTestCasesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTestCaseMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTestCaseMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("test_case.name", String.valueOf(request.getTestCase().getName())); return builder.build(); }) .build(); GrpcCallSettings runTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runTestCaseMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings batchRunTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchRunTestCasesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings calculateCoverageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(calculateCoverageMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("agent", String.valueOf(request.getAgent())); return builder.build(); }) .build(); GrpcCallSettings importTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importTestCasesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings exportTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportTestCasesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings listTestCaseResultsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCaseResultsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getTestCaseResultTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseResultMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings getLocationTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getLocationMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); this.listTestCasesCallable = callableFactory.createUnaryCallable( listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); this.listTestCasesPagedCallable = callableFactory.createPagedCallable( listTestCasesTransportSettings, settings.listTestCasesSettings(), clientContext); this.batchDeleteTestCasesCallable = callableFactory.createUnaryCallable( batchDeleteTestCasesTransportSettings, settings.batchDeleteTestCasesSettings(), clientContext); this.getTestCaseCallable = callableFactory.createUnaryCallable( getTestCaseTransportSettings, settings.getTestCaseSettings(), clientContext); this.createTestCaseCallable = callableFactory.createUnaryCallable( createTestCaseTransportSettings, settings.createTestCaseSettings(), clientContext); this.updateTestCaseCallable = callableFactory.createUnaryCallable( updateTestCaseTransportSettings, settings.updateTestCaseSettings(), clientContext); this.runTestCaseCallable = callableFactory.createUnaryCallable( runTestCaseTransportSettings, settings.runTestCaseSettings(), clientContext); this.runTestCaseOperationCallable = callableFactory.createOperationCallable( runTestCaseTransportSettings, settings.runTestCaseOperationSettings(), clientContext, operationsStub); this.batchRunTestCasesCallable = callableFactory.createUnaryCallable( batchRunTestCasesTransportSettings, settings.batchRunTestCasesSettings(), clientContext); this.batchRunTestCasesOperationCallable = callableFactory.createOperationCallable( batchRunTestCasesTransportSettings, settings.batchRunTestCasesOperationSettings(), clientContext, operationsStub); this.calculateCoverageCallable = callableFactory.createUnaryCallable( calculateCoverageTransportSettings, settings.calculateCoverageSettings(), clientContext); this.importTestCasesCallable = callableFactory.createUnaryCallable( importTestCasesTransportSettings, settings.importTestCasesSettings(), clientContext); this.importTestCasesOperationCallable = callableFactory.createOperationCallable( importTestCasesTransportSettings, settings.importTestCasesOperationSettings(), clientContext, operationsStub); this.exportTestCasesCallable = callableFactory.createUnaryCallable( exportTestCasesTransportSettings, settings.exportTestCasesSettings(), clientContext); this.exportTestCasesOperationCallable = callableFactory.createOperationCallable( exportTestCasesTransportSettings, settings.exportTestCasesOperationSettings(), clientContext, operationsStub); this.listTestCaseResultsCallable = callableFactory.createUnaryCallable( listTestCaseResultsTransportSettings, settings.listTestCaseResultsSettings(), clientContext); this.listTestCaseResultsPagedCallable = callableFactory.createPagedCallable( listTestCaseResultsTransportSettings, settings.listTestCaseResultsSettings(), clientContext); this.getTestCaseResultCallable = callableFactory.createUnaryCallable( getTestCaseResultTransportSettings, settings.getTestCaseResultSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.listLocationsPagedCallable = callableFactory.createPagedCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.getLocationCallable = callableFactory.createUnaryCallable( getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public GrpcOperationsStub getOperationsStub() { return operationsStub; } @Override public UnaryCallable listTestCasesCallable() { return listTestCasesCallable; } @Override public UnaryCallable listTestCasesPagedCallable() { return listTestCasesPagedCallable; } @Override public UnaryCallable batchDeleteTestCasesCallable() { return batchDeleteTestCasesCallable; } @Override public UnaryCallable getTestCaseCallable() { return getTestCaseCallable; } @Override public UnaryCallable createTestCaseCallable() { return createTestCaseCallable; } @Override public UnaryCallable updateTestCaseCallable() { return updateTestCaseCallable; } @Override public UnaryCallable runTestCaseCallable() { return runTestCaseCallable; } @Override public OperationCallable runTestCaseOperationCallable() { return runTestCaseOperationCallable; } @Override public UnaryCallable batchRunTestCasesCallable() { return batchRunTestCasesCallable; } @Override public OperationCallable< BatchRunTestCasesRequest, BatchRunTestCasesResponse, BatchRunTestCasesMetadata> batchRunTestCasesOperationCallable() { return batchRunTestCasesOperationCallable; } @Override public UnaryCallable calculateCoverageCallable() { return calculateCoverageCallable; } @Override public UnaryCallable importTestCasesCallable() { return importTestCasesCallable; } @Override public OperationCallable importTestCasesOperationCallable() { return importTestCasesOperationCallable; } @Override public UnaryCallable exportTestCasesCallable() { return exportTestCasesCallable; } @Override public OperationCallable exportTestCasesOperationCallable() { return exportTestCasesOperationCallable; } @Override public UnaryCallable listTestCaseResultsCallable() { return listTestCaseResultsCallable; } @Override public UnaryCallable listTestCaseResultsPagedCallable() { return listTestCaseResultsPagedCallable; } @Override public UnaryCallable getTestCaseResultCallable() { return getTestCaseResultCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @Override public final void close() { try { backgroundResources.close(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Failed to close resource", e); } } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy