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