Java Reference
In-Depth Information
Example 16−3: Mud.java (continued)
/** Remove a thing from this place */
public void destroyThing(RemoteMudPerson who, String thing)
throws RemoteException, NotThere, NoSuchThing;
/**
* Create a new place, bi-directionally linked to this one by an exit
**/
public void createPlace(RemoteMudPerson creator,
String exit, String entrance,
String name, String description)
throws RemoteException,NotThere,
ExitAlreadyExists,PlaceAlreadyExists;
/**
* Link this place (unidirectionally) to some existing place. The
* destination place may even be on another server.
**/
public void linkTo(RemoteMudPerson who, String exit,
String hostname, String mudname, String placename)
throws RemoteException, NotThere, ExitAlreadyExists, NoSuchPlace;
/** Remove an existing exit */
public void close(RemoteMudPerson who, String exit)
throws RemoteException, NotThere, NoSuchExit;
/**
* Remove this person from this place, leaving them nowhere.
* Send the specified message to everyone left in the place.
**/
public void exit(RemoteMudPerson who, String message)
throws RemoteException, NotThere;
/**
* Put a person in a place, assigning their name, and sending the
* specified message to everyone else in the place. The client should
* not make this method available to the user. They should use go()
* instead.
**/
public void enter(RemoteMudPerson who, String name, String message)
throws RemoteException, AlreadyThere;
/**
* Return the server object of the MUD that "contains" this place
* This method should not be directly visible to the player
**/
public RemoteMudServer getServer() throws RemoteException;
}
/**
* This is a generic exception class that serves as the superclass
* for a bunch of more specific exception types
**/
public static class MudException extends Exception {}
/**
* These specific exception classes are thrown in various contexts.
* The exception class name contains all the information about the
* exception; no detail messages are provided by these classes.
Search WWH ::




Custom Search