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 010 011/** 012 * Represents an object that has a remote connection 013 * @deprecated Use {@link edu.wpi.first.networktables.NetworkTableInstance}. 014 */ 015@Deprecated 016public interface IRemote { 017 /** 018 * Register an object to listen for connection and disconnection events 019 * 020 * @param listener the listener to be register 021 * @param immediateNotify if the listener object should be notified of the current connection state 022 */ 023 public void addConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify); 024 025 /** 026 * Unregister a listener from connection events 027 * 028 * @param listener the listener to be unregistered 029 */ 030 public void removeConnectionListener(IRemoteConnectionListener listener); 031 032 /** 033 * Get the current state of the objects connection 034 * @return the current connection state 035 */ 036 public boolean isConnected(); 037 038 /** 039 * If the object is acting as a server 040 * @return if the object is a server 041 */ 042 public boolean isServer(); 043}