📄 messenger.java
字号:
/* * @<#>Messenger.java version 0.0.1, 1/1/2000 * * THIS PROGRAM IS FREE SOFTWARE; YOU CAN DISTRIBUTE IT AND/OR * MODIFY IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE * AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION. * * THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE * GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS. * * Copyright (c) 2000 Wayne State University. All Rights Reserved. */package naplet.message;/** * The <code>Messenger</code> interface identifies the methods * implemented by a naplet server, which are accessible to naplets. * * @version 0.0.1, 1/1/2000 * @author C. Xu */ import java.rmi.Remote;import java.rmi.RemoteException;import naplet.*;import java.net.*;public interface Messenger { /** * Location-independent message passing. It relies on naplet directory * to get location information * * @param src NapletID of the sender * @param dest NapletID of the receiver * @param msg Message to be sent */ public void send(NapletID src, NapletID dest, Message msg) throws NapletCommunicationException; /** * Location-independent message passing. It relies on naplet directory * to get location information with a timelimit "timeout" * * @param src NapletID of the sender * @param dest NapletID of the receiver * @param msg Message to be sent * @param timeout Time limit to locate receiver address from the directory */ public void send(NapletID src, NapletID dest, Message msg, long timeout) throws NapletCommunicationException; /** * Naplet server oriented message passing * * @param src NapletID of the sender * @param dest Destination server * @param msg <code>Message</code> object to be sent * @see Message */ public void send(NapletID src, URN dest, Message msg) throws NapletCommunicationException; public void receive( Message msg, InetAddress addr); public MailBox getMailBox(NapletID nid); public MailBox openMailBox( NapletID nid ); public void removeMailBox( NapletID nid ); public Message checkMailBox( NapletID nid );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -