📄 deviceconnector.java
字号:
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 © <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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -