001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package javax.util.concurrent; 018 019 import java.util.concurrent.ExecutionException; 020 021 /** 022 * Exception indicating that the result of a value-producing task cannot be retrieved because the 023 * remote executor that the task is running on is no longer available.<p> 024 * 025 * Use the {@link java.lang.Throwable#getCause()} method to determine why the executor is no longer available. 026 */ 027 public class ExecutorNotAvailableException extends ExecutionException { 028 029 private static final long serialVersionUID = 4086046729432722254L; 030 031 /** 032 * Constructs an ExecutorNotAvailableException with <code>null</code> as its detail message. 033 * The cause is not initialized, and may subsequently be initialized by a call to 034 * {@link java.lang.Throwable#initCause(java.lang.Throwable)}. 035 */ 036 public ExecutorNotAvailableException() { 037 super(); 038 } 039 040 /** 041 * Constructs an ExecutorNotAvailableException exception with the specified detail message.<p> 042 * 043 * The cause is not initialized, and may subsequently be initialized by a call to 044 * {@link java.lang.Throwable#initCause(java.lang.Throwable)}. 045 * 046 * @param message the detail message (which is saved for later retrieval by the {@link java.lang.Throwable#getMessage()} method). 047 */ 048 public ExecutorNotAvailableException(String message) { 049 super(message); 050 } 051 052 /** 053 * Constructs an ExecutorNotAvailableException exception with the specified detail message and cause.<p> 054 * 055 * Note that the detail message associated with cause is not automatically incorporated in 056 * this exception's detail message. 057 * 058 * @param message the detail message (which is saved for later retrieval by the {@link java.lang.Throwable#getMessage()} method). 059 * @param cause the cause (which is saved for later retrieval by the {@link java.lang.Throwable#getCause()} method). 060 * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) 061 */ 062 public ExecutorNotAvailableException(String message, Throwable cause) { 063 super(message, cause); 064 } 065 066 /** 067 * Constructs an ExecutorNotAvailableException exception with the specified cause and a 068 * detail message of (cause==null ? null : cause.toString()) 069 * (which typically contains the class and detail message of cause). 070 * 071 * @param cause the cause (which is saved for later retrieval by the {@link java.lang.Throwable#getCause()} method). 072 * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) 073 */ 074 public ExecutorNotAvailableException(Throwable cause) { 075 super(cause); 076 } 077 078 }