1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.tradefed.device; 17 18 /** 19 * Thrown when a device is no longer reachable via it's transport type. e.g. if the device is no 20 * longer visible via USB, or TCP/IP connection 21 */ 22 public class DeviceDisconnectedException extends DeviceNotAvailableException { 23 24 private static final long serialVersionUID = 1L; 25 26 /** 27 * Creates a {@link DeviceDisconnectedException}. 28 */ 29 public DeviceDisconnectedException() { 30 super(); 31 } 32 33 /** 34 * Creates a {@link DeviceDisconnectedException}. 35 * 36 * @param msg a descriptive message. 37 * 38 * @deprecated use {@link #DeviceDisconnectedException(String msg, String serial)} instead 39 */ 40 @Deprecated 41 public DeviceDisconnectedException(String msg) { 42 super(msg); 43 } 44 45 /** 46 * Creates a {@link DeviceDisconnectedException}. 47 * 48 * @param msg a descriptive message. 49 */ 50 public DeviceDisconnectedException(String msg, String serial) { 51 super(msg, serial); 52 } 53 54 /** 55 * Creates a {@link DeviceDisconnectedException}. 56 * 57 * @param msg a descriptive message. 58 * @param cause the root {@link Throwable} that caused the device to become unavailable. 59 * 60 * @deprecated use 61 * {@link #DeviceDisconnectedException(String msg, Throwable cause, String serial)} instead 62 */ 63 @Deprecated 64 public DeviceDisconnectedException(String msg, Throwable cause) { 65 super(msg, cause); 66 } 67 68 /** 69 * Creates a {@link DeviceDisconnectedException}. 70 * 71 * @param msg a descriptive message. 72 * @param cause the root {@link Throwable} that caused the device to become disconnected. 73 */ 74 public DeviceDisconnectedException(String msg, Throwable cause, String serial) { 75 super(msg, cause, serial); 76 } 77 78 } 79