001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2017-2018. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj.tables; 009 010import edu.wpi.first.networktables.ConnectionInfo; 011 012/** 013 * A listener that listens for connection changes in a {@link IRemote} object 014 * @deprecated Use Consumer<{@link edu.wpi.first.networktables.ConnectionNotification}>. 015 */ 016@Deprecated 017public interface IRemoteConnectionListener { 018 /** 019 * Called when an IRemote is connected 020 * @param remote the object that connected 021 */ 022 public void connected(IRemote remote); 023 /** 024 * Called when an IRemote is disconnected 025 * @param remote the object that disconnected 026 */ 027 public void disconnected(IRemote remote); 028 /** 029 * Extended version of connected called when an IRemote is connected. 030 * Contains the connection info of the connected remote 031 * @param remote the object that connected 032 * @param info the connection info for the connected remote 033 */ 034 default public void connectedEx(IRemote remote, ConnectionInfo info) { 035 connected(remote); 036 } 037 /** 038 * Extended version of connected called when an IRemote is disconnected. 039 * Contains the connection info of the disconnected remote 040 * @param remote the object that disconnected 041 * @param info the connection info for the disconnected remote 042 */ 043 default public void disconnectedEx(IRemote remote, ConnectionInfo info) { 044 disconnected(remote); 045 } 046}