001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package edu.wpi.first.networktables; 006 007/** NetworkTables publisher or subscriber. */ 008public interface PubSub extends AutoCloseable { 009 @Override 010 void close(); 011 012 /** 013 * Gets the subscribed-to / published-to topic. 014 * 015 * @return Topic 016 */ 017 Topic getTopic(); 018 019 /** 020 * Determines if the native handle is valid. 021 * 022 * @return True if the native handle is valid, false otherwise. 023 */ 024 boolean isValid(); 025 026 /** 027 * Gets the native handle. 028 * 029 * @return Handle 030 */ 031 int getHandle(); 032}