001package edu.wpi.first.wpilibj.tables;
002
003
004/**
005 * Represents an object that has a remote connection
006 * 
007 * @author Mitchell
008 *
009 */
010public interface IRemote {
011        /**
012         * Register an object to listen for connection and disconnection events
013         * 
014         * @param listener the listener to be register
015         * @param immediateNotify if the listener object should be notified of the current connection state
016         */
017        public void addConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify);
018
019        /**
020         * Unregister a listener from connection events
021         * 
022         * @param listener the listener to be unregistered
023         */
024        public void removeConnectionListener(IRemoteConnectionListener listener);
025        
026        /**
027         * Get the current state of the objects connection
028         * @return the current connection state
029         */
030    public boolean isConnected();
031        
032        /**
033         * If the object is acting as a server
034         * @return if the object is a server
035         */
036    public boolean isServer();
037}