Coverage Summary for Class: ForwardingListeningExecutorService (com.google.common.util.concurrent)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| ForwardingListeningExecutorService | 0% (0/1) | 0% (0/4) | 0% (0/4) |
1 /* 2 * Copyright (C) 2011 The Guava Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 15 package com.google.common.util.concurrent; 16 17 import com.google.common.annotations.GwtIncompatible; 18 import com.google.errorprone.annotations.CanIgnoreReturnValue; 19 import java.util.concurrent.Callable; 20 import org.checkerframework.checker.nullness.qual.Nullable; 21 22 /** 23 * A listening executor service which forwards all its method calls to another listening executor 24 * service. Subclasses should override one or more methods to modify the behavior of the backing 25 * executor service as desired per the <a 26 * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>. 27 * 28 * @author Isaac Shum 29 * @since 10.0 30 */ 31 @CanIgnoreReturnValue // TODO(cpovirk): Consider being more strict. 32 @GwtIncompatible 33 @ElementTypesAreNonnullByDefault 34 public abstract class ForwardingListeningExecutorService extends ForwardingExecutorService 35 implements ListeningExecutorService { 36 /** Constructor for use by subclasses. */ 37 protected ForwardingListeningExecutorService() {} 38 39 @Override 40 protected abstract ListeningExecutorService delegate(); 41 42 @Override 43 public <T extends @Nullable Object> ListenableFuture<T> submit(Callable<T> task) { 44 return delegate().submit(task); 45 } 46 47 @Override 48 public ListenableFuture<?> submit(Runnable task) { 49 return delegate().submit(task); 50 } 51 52 @Override 53 public <T extends @Nullable Object> ListenableFuture<T> submit( 54 Runnable task, @ParametricNullness T result) { 55 return delegate().submit(task, result); 56 } 57 }