deviceconnector.java

来自「这是一个以JAVA编写的程序,本人还没有试过,是一个简单的温度控制系统」· Java 代码 · 共 52 行

JAVA
52
字号
package net.sf.dz.daemon.tcp.client;import java.io.IOException;/** * A device connector. * * <p> * * Provides a transparent gateway to a possibly remote device. * * <p> * * At this point, the communication model is asynchronous - if the consumer * wants the device to <strong>respond</strong>, then request/response pair * identification pair will have to reside above the device connector layer. * * @author Copyright &copy; <a href="mailto:vt@freehold.crocodile.org">Vadim Tkachenko</a> 2001-2004 * @version $Id: DeviceConnector.java,v 1.2 2004/06/28 20:35:47 vtt Exp $ */public interface DeviceConnector {    /**     * @return Implementation specific address of a device this connector is     * connected to.     */    public String getDeviceAddress();        /**     * Send a command to the device.     *     * @param command Command to send.     */    public void send(String command) throws IOException;        /**     * Send a command to the device and wait for the answer.     *     * @param command Command to send.     *     * @return Device response.     */    public String sendExclusive(String command) throws IOException;        /**     * Add a listener for this device.     *     * @param listener Device listener.     */    public void addListener(DeviceListener listener);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?