destination.java
来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 30 行
JAVA
30 行
package broker;import com.Message;/** * Defines a set of methods a client and a broker of a publish/subscribe * system must implement. */public interface Destination { /** * Returns true if the object is a broker, otherwise false. * @return true if the object is a broker, otherwise false. */ public boolean isBroker(); /** * Returns true if the object is a client, otherwise false. * @return true if the object is a client, otherwise false. */ public boolean isClient(); /** * Receives a message. * @param sender the message's sender. * @param message the message itself. */ public void receive(Destination sender, Message message);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?