当前位置: 技术问答>java相关
求救!!!!!!!!!!!
来源: 互联网 发布时间:2015-07-09
本文导语: 各位大虾们谁能给我一个完整的RMI程序 最好是简单点的能够执行就可以了 一定给高分 | import java.rmi.*; import java.util.Vector; import java.io.IOException; public class Mud { public interface RemoteMudSe...
各位大虾们谁能给我一个完整的RMI程序
最好是简单点的能够执行就可以了
一定给高分
最好是简单点的能够执行就可以了
一定给高分
|
import java.rmi.*;
import java.util.Vector;
import java.io.IOException;
public class Mud {
public interface RemoteMudServer extends Remote {
/** Return the name of this MUD */
public String getMudName() throws RemoteException;
/** Return the main entrance place for this MUD */
public RemoteMudPlace getEntrance() throws RemoteException;
/** Look up and return some other named place in this MUD */
public RemoteMudPlace getNamedPlace(String name)
throws RemoteException, NoSuchPlace;
public void dump(String password, String filename)
throws RemoteException, BadPassword, IOException;
}
public interface RemoteMudPerson extends Remote {
/** Return a full description of the person */
public String getDescription() throws RemoteException;
/** Deliver a message to the person */
public void tell(String message) throws RemoteException;
}
public interface RemoteMudPlace extends Remote {
/** Look up the name of this place */
public String getPlaceName() throws RemoteException;
/** Get a description of this place */
public String getDescription() throws RemoteException;
/** Find out the names of all people here */
public Vector getNames() throws RemoteException;
/** Get the names of all things here */
public Vector getThings() throws RemoteException;
/** Get the names of all ways out of here */
public Vector getExits() throws RemoteException;
/** Get the RemoteMudPerson object for the named person. */
public RemoteMudPerson getPerson(String name)
throws RemoteException, NoSuchPerson;
/** Get more details about a named thing */
public String examineThing(String name)
throws RemoteException,NoSuchThing;
/** Use the named exit */
public RemoteMudPlace go(RemoteMudPerson who, String direction)
throws RemoteException,NotThere,AlreadyThere,NoSuchExit,LinkFailed;
/** Send a message of the form "David: hi everyone" */
public void speak(RemoteMudPerson speaker, String msg)
throws RemoteException, NotThere;
/** Send a message of the form "David laughs loudly" */
public void act(RemoteMudPerson speaker, String msg)
throws RemoteException, NotThere;
/** Add a new thing in this place */
public void createThing(RemoteMudPerson who, String name,
String description)
throws RemoteException, NotThere, AlreadyThere;
import java.util.Vector;
import java.io.IOException;
public class Mud {
public interface RemoteMudServer extends Remote {
/** Return the name of this MUD */
public String getMudName() throws RemoteException;
/** Return the main entrance place for this MUD */
public RemoteMudPlace getEntrance() throws RemoteException;
/** Look up and return some other named place in this MUD */
public RemoteMudPlace getNamedPlace(String name)
throws RemoteException, NoSuchPlace;
public void dump(String password, String filename)
throws RemoteException, BadPassword, IOException;
}
public interface RemoteMudPerson extends Remote {
/** Return a full description of the person */
public String getDescription() throws RemoteException;
/** Deliver a message to the person */
public void tell(String message) throws RemoteException;
}
public interface RemoteMudPlace extends Remote {
/** Look up the name of this place */
public String getPlaceName() throws RemoteException;
/** Get a description of this place */
public String getDescription() throws RemoteException;
/** Find out the names of all people here */
public Vector getNames() throws RemoteException;
/** Get the names of all things here */
public Vector getThings() throws RemoteException;
/** Get the names of all ways out of here */
public Vector getExits() throws RemoteException;
/** Get the RemoteMudPerson object for the named person. */
public RemoteMudPerson getPerson(String name)
throws RemoteException, NoSuchPerson;
/** Get more details about a named thing */
public String examineThing(String name)
throws RemoteException,NoSuchThing;
/** Use the named exit */
public RemoteMudPlace go(RemoteMudPerson who, String direction)
throws RemoteException,NotThere,AlreadyThere,NoSuchExit,LinkFailed;
/** Send a message of the form "David: hi everyone" */
public void speak(RemoteMudPerson speaker, String msg)
throws RemoteException, NotThere;
/** Send a message of the form "David laughs loudly" */
public void act(RemoteMudPerson speaker, String msg)
throws RemoteException, NotThere;
/** Add a new thing in this place */
public void createThing(RemoteMudPerson who, String name,
String description)
throws RemoteException, NotThere, AlreadyThere;
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。