|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.game.Zone
public class Zone
Field Summary | |
---|---|
private Map<String,AbstractRoom> |
badges
Badges are icons placed upon the map to indicate something special about a room |
static AbstractCensor |
censor
Censorship object (Hangman) censor (OsirisPure) |
protected Set<String> |
cullRooms
Rooms to be culled |
protected static Set<AbstractZone> |
emptyZones
List of empty zones |
(package private) static long |
lastCheckedZonesForSpawn
|
private List<AbstractRoom> |
lobbies
Lobby rooms into which users are dropped at login, if they don't specify an initial room to join on their own |
protected Set<String> |
myEmptyZones
Names of empty zones |
private String |
myName
The name of this zone |
private String |
myServer
The hostname of the server on which this Zone is running |
private int |
myServerPort
The port number of the server on which this Zone is running |
private int |
nextDynamicRoomNumber
The room numbers for dynamic rooms begin here |
private static int |
NPC_TICK_INTERVAL
Time between updates for NPC's |
private static Random |
randomSource
keep the random source around for fun. |
(package private) static Set<AbstractZone> |
retiredZones
Set of retired zones |
private ConcurrentHashMap<Integer,Room> |
roomsByID
All rooms in the Zone: sorted by ID. |
private ConcurrentHashMap<String,Room> |
roomsByMoniker
All rooms in the Zone: sorted by moniker. |
private static long |
serialVersionUID
Java Serialization unique ID |
protected boolean |
serverReady
A flag set once the server has indicated that it's ready to go, to avoid issues with events firing off too soon (e.g. |
private static int |
USER_ROOM_MAX_USERS
Max users allowed into one room of an user's house at a time |
private ConcurrentSkipListSet<Integer> |
usersInZone
the set of user ID's of all users in the Zone. |
private static double |
ZONE_FULL_RATIO
Get the percentage of "full" at which we consider a zone to be full enough to warrant spawning new ones. |
(package private) static double |
ZONE_LIGHT_RATIO
Get the percentage of "full" at which we consider a zone to be light enough that it's almost empty |
private static int |
ZONE_MAX_USERS
The max. |
private static int |
ZONE_SPAWN_SECONDS
Time (in seconds) between spawning new zones |
Constructor Summary | |
---|---|
Zone(String zoneName)
|
Method Summary | |
---|---|
void |
activate()
This is an overriding method. |
void |
add(AbstractRoom room)
This is an overriding method. |
void |
add(AbstractUser user)
|
void |
assertStaffLevel(User u,
int staffLevelRequired)
Assert that the given user must have a given level of staff privileges |
private void |
badgesChanged()
Notify everyone in the zone that the badges have been changed |
void |
biff(com.tootsville.user.Toot user,
AbstractRoom room)
Deprecated. Use Toot.biff(AbstractZone, AbstractRoom)
instead |
(package private) void |
checkZonesForSpawn()
See if enough zones are full to warrant spawning a new one; or, if zones are empty and can be deallocated. |
void |
clearAllBadges()
|
void |
clearAllBadges(AbstractRoom room)
clear all badges on one room |
void |
clearBadge(String string)
clear the given badge name off of any room to which it might be applied |
int |
compareTo(AbstractZone other)
|
static void |
configUpdated()
|
protected void |
cullUserRooms()
remove unused user rooms |
void |
destroy()
This is an overriding method. |
void |
destroyRoom(AbstractRoom room)
This is an overriding method. |
private void |
dropUser(User user)
Drop the user's house from the Zone |
boolean |
equals(AbstractZone z)
determine whether two Zone pointers are the same object |
boolean |
equals(Object obj)
This is an overriding method. |
private String |
genZoneName()
Generate the name for a new zone based upon this one's name |
private org.json.JSONObject |
getAllBadges_JSON()
get all badges on the Zone in JSON form |
Map<String,String> |
getAllBadges()
Get all badges in this Zone (and to which rooms they are applied) |
Set<Integer> |
getAllUsersIDsInZone()
get the user ID's of all users active in the Zone |
Collection<AbstractUser> |
getAllUsersInZone()
This is an overriding method. |
private String |
getApple(AppiusClaudiusCaecus serverThread,
String pass)
Deprecated. |
Set<String> |
getBadgesForRoom(AbstractRoom room)
Get any badges assigned to a room |
static Zone |
getByName(String name)
Deprecated. use AppiusClaudiusCaecus.getZone(String) |
int |
getDynamicRoomNumber()
|
String |
getHost()
Get the host on which this zone's server is running |
int |
getMaxUsers()
This is an overriding method. |
String |
getMyServer()
|
int |
getMyServerPort()
|
String |
getName()
This is an overriding method. |
AbstractRoom |
getNextLobby()
Get the next room which will accept an inbound user as the next lobby. |
static int |
getNPCTickInterval()
|
private static int |
getNumberOfZonesNeeded(LinkedList<AbstractZone> zones)
This is a breakout from checkZonesForSpawn() to
determine the number of zones that need to be spawned or removed |
int |
getPort()
Get the port number on which this zone's server is running |
static String |
getRev()
|
Room |
getRoom(Integer room)
This is an overriding method. |
Room |
getRoomByName(String string)
This is an overriding method. |
Collection<AbstractRoom> |
getRoomList()
This is an overriding method. |
String |
getRoomListSFSXML()
This is an overriding method. |
int |
getRoomMaxUsers()
This is an overriding method. |
User |
getSystemUser()
Deprecated. unused? |
String |
getURL()
TODO: document this method (brpocock, Jan 4, 2010) |
AbstractUser |
getUserByName(String buddy)
This is an overriding method. |
Collection<AbstractUser> |
getUserList()
Deprecated. |
AbstractRoom |
getUserRoom(AbstractUser user)
This is an overriding method. |
static int |
getUserRoomMaxUsers()
|
org.json.JSONObject |
getZoneData_JSON(AbstractUser user)
Gets the Zone data. |
private static double |
getZoneFullRatio()
|
private static double |
getZoneLightRatio()
|
org.json.JSONObject |
getZoneList_JSON(AbstractUser user)
Get the set of all zones active (and not hidden nor retired) in JSON form. |
static int |
getZoneMaxUsers()
|
static int |
getZoneSpawnSeconds()
Get the number of seconds between checking for zone spawning |
boolean |
handleLogin(String zoneName,
String bigNick,
String password,
AppiusClaudiusCaecus serverThread)
Deprecated. |
void |
handleRequest(String cmd,
org.json.JSONObject jso,
User u,
int fromRoom)
This is an overriding method. |
(package private) void |
handleServerReady()
Once the server indicates its readiness, begin spawning auto-spawning Zones |
protected void |
handleSpeak(AbstractRoom room,
AbstractUser u,
String toSpeak)
Deprecated. use AbstractUser.speak(AbstractRoom, String) |
void |
handleSpeak(int roomNumber,
AbstractUser user,
String speech)
Deprecated. use AbstractUser.speak(AbstractRoom, String) |
void |
handleSpeak(Integer roomNum,
AbstractUser speaker,
String toSpeak)
Deprecated. use AbstractUser.speak(AbstractRoom, String) |
void |
handleUserLost(User user)
WRITEME: document this method (brpocock, Jul 14, 2009) |
void |
handleUserPart(String zone,
AbstractRoom room,
String uid,
User user,
String oldPlayerIndex)
WRITEME: document this method (brpocock, Jul 14, 2009) |
int |
hashCode()
This is an overriding method. |
void |
init()
This is an overriding method. |
private void |
isItGood()
Check over Zone spawn |
void |
readExternal(ObjectInput in)
This is an overriding method. |
void |
remove(AbstractUser thing)
This is an overriding method. |
void |
retire()
Stop accepting new users |
void |
sendAdminMessage(AbstractRoom room,
User user,
String message)
Deprecated. |
private void |
sendBadges(AbstractUser user)
send badges to an given user in this zone |
protected void |
sendBadPassword(String nick,
AppiusClaudiusCaecus channel,
User user,
String zoneName,
String password)
Send the user a notification that their password was incorrect |
protected void |
sendBuddyNotice(String buddyName,
boolean isOnline,
String roomMoniker,
String roomTitle,
User u,
int room)
Sends a buddy notice message to the client |
void |
sendEarnings(int r,
User u,
String msg)
Deprecated. Use User.sendEarnings(AbstractRoom, String)
instead |
void |
sendError_RAW(String xtnName,
String message,
AppiusClaudiusCaecus channel)
Deprecated. Use AppiusClaudiusCaecus.sendError_RAW(String,String)
instead |
void |
sendErrorReply(String source,
String error,
org.json.JSONObject result,
User u,
int room)
WRITEME: document this method (brpocock, Aug 20, 2009) |
protected void |
sendLoginPacket(String zoneName,
String nick,
String password,
AppiusClaudiusCaecus serverThread,
User user,
LinkedList<AppiusClaudiusCaecus> recipients)
Deprecated. |
protected void |
sendLogKO(AppiusClaudiusCaecus recipient)
Deprecated. Use AppiusClaudiusCaecus.sendLogKO()
instead |
protected void |
sendLogKO(AppiusClaudiusCaecus recipient,
String messageText)
Deprecated. Use AppiusClaudiusCaecus.sendLogKO(String)
instead |
void |
sendModMessage(AbstractRoom room,
User user,
String message)
Sends an (anonymous) moderator message to the user |
protected void |
sendNoSuchUser(LinkedList<AppiusClaudiusCaecus> recipients,
String nick,
String zoneName,
String password)
Tell the user to bugger off, because they don't exist |
void |
sendOops(User u)
Sends the user the private message /00p$ |
void |
sendOops(User u,
AbstractRoom room)
Deprecated. |
(package private) void |
sendResponse(org.json.JSONObject result,
Integer room,
AbstractUser u,
AppiusClaudiusCaecus recipient)
Deprecated. use AppiusClaudiusCaecus.sendResponse(JSONObject, Integer, AbstractUser)
directly |
(package private) void |
sendResponse(org.json.JSONObject result,
Integer room,
AbstractUser u,
Collection<AppiusClaudiusCaecus> recipients)
Deprecated. use AppiusClaudiusCaecus.sendResponse(JSONObject, Integer, AbstractUser)
directly |
void |
sendSuccessReply(String source,
org.json.JSONObject resultIn,
AbstractUser u,
int room)
Send a reply with a success indicator to a list of recipients. |
void |
sendSuccessReply(String source,
org.json.JSONObject resultIn,
AbstractUser u,
int room,
AppiusClaudiusCaecus recipient)
Deprecated. Use AppiusClaudiusCaecus.sendSuccessReply(String,JSONObject,AbstractUser,int)
instead |
void |
sendSuccessReply(String source,
org.json.JSONObject resultIn,
AbstractUser u,
int room,
LinkedList<AppiusClaudiusCaecus> recipients)
Deprecated. This was just being abused to be compatible with SFS, you almost certainly just wanted sendSuccessReply(String, JSONObject, AbstractUser,int) |
(package private) void |
sendUserLists(AbstractUser user)
Sends the user an asynchronous notification of their user lists' status. |
(package private) void |
sendWardrobe(AbstractUser user,
Object ignored,
int room)
Send a "from:wardrobe" message to the user |
void |
setAutoJoinRoom(int id)
This is an overriding method. |
void |
setBadge(String badge,
AbstractRoom room)
WRITEME |
void |
setMyServer(String server)
|
void |
setMyServerPort(int serverPort)
|
String |
spawnNewZone()
This is an overriding method. |
void |
spawnZone(String zoneName)
Create a new, empty zone, and attach the default properties to it. |
void |
spawnZone(String zoneName,
String image)
Create a new, empty zone, and attach the default properties to it. |
void |
tellEaves(AbstractUser user,
AbstractRoom room,
String verb,
String note)
TODO: document this method (brpocock, Oct 28, 2009) |
void |
trace(String string)
This is an overriding method. |
void |
writeExternal(ObjectOutput out)
This is an overriding method. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final AbstractCensor censor
protected static final Set<AbstractZone> emptyZones
static long lastCheckedZonesForSpawn
private static int NPC_TICK_INTERVAL
private static Random randomSource
static Set<AbstractZone> retiredZones
private static final long serialVersionUID
private static int USER_ROOM_MAX_USERS
private static double ZONE_FULL_RATIO
static double ZONE_LIGHT_RATIO
private static int ZONE_MAX_USERS
private static int ZONE_SPAWN_SECONDS
private final transient Map<String,AbstractRoom> badges
protected final transient Set<String> cullRooms
private final transient List<AbstractRoom> lobbies
protected final transient Set<String> myEmptyZones
private final String myName
private String myServer
private int myServerPort
private int nextDynamicRoomNumber
private final ConcurrentHashMap<Integer,Room> roomsByID
roomsByMoniker
private final ConcurrentHashMap<String,Room> roomsByMoniker
roomsByID
protected boolean serverReady
private final ConcurrentSkipListSet<Integer> usersInZone
Constructor Detail |
---|
public Zone(String zoneName)
zoneName
- The name for the new ZoneMethod Detail |
---|
public static void configUpdated()
@Deprecated public static Zone getByName(String name)
AppiusClaudiusCaecus.getZone(String)
name
- the name of the Zone to find
public static int getNPCTickInterval()
private static int getNumberOfZonesNeeded(LinkedList<AbstractZone> zones)
checkZonesForSpawn()
to
determine the number of zones that need to be spawned or removed
zones
- The set of all Zones in the multiverse
public static String getRev()
public static int getUserRoomMaxUsers()
private static double getZoneFullRatio()
private static double getZoneLightRatio()
public static int getZoneMaxUsers()
public static int getZoneSpawnSeconds()
public void activate()
activate
in interface AbstractZone
AbstractZone.activate()
public void add(AbstractRoom room)
add
in interface AbstractZone
room
- The room to be added.AbstractZone.add(AbstractRoom)
public void add(AbstractUser user)
user
- the user entering the zonepublic void assertStaffLevel(User u, int staffLevelRequired) throws PrivilegeRequiredException
u
- The Smart Fox user objectstaffLevelRequired
- The staff level required to perform the
action
PrivilegeRequiredException
- if the userprivate void badgesChanged()
@Deprecated public void biff(com.tootsville.user.Toot user, AbstractRoom room) throws org.json.JSONException
Toot.biff(AbstractZone, AbstractRoom)
instead
user
- A Tootsville™ userroom
- The room in which the user is standing
org.json.JSONException
- If the biff can't be sentvoid checkZonesForSpawn()
public void clearAllBadges()
clearAllBadges
in interface AbstractZone
AbstractZone.clearAllBadges()
public void clearAllBadges(AbstractRoom room)
clearAllBadges
in interface AbstractZone
room
- the room upon which all badges are to be clearedpublic void clearBadge(String string) throws GameLogicException
clearBadge
in interface AbstractZone
string
- the badge name
GameLogicException
- if the given badge wasn't set on the
room alreadypublic int compareTo(AbstractZone other)
compareTo
in interface Comparable<AbstractZone>
compareTo
in interface AbstractZone
other
- the other zone
protected void cullUserRooms()
public void destroy()
destroy
in interface AbstractZone
AbstractZone.destroy()
public void destroyRoom(AbstractRoom room)
destroyRoom
in interface AbstractZone
room
- WRITEMEAbstractZone.destroyRoom(AbstractRoom)
private void dropUser(User user)
user
- the user whose house is to be droppedpublic boolean equals(AbstractZone z)
z
- another Zone
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
private String genZoneName()
public Map<String,String> getAllBadges()
private org.json.JSONObject getAllBadges_JSON()
public Set<Integer> getAllUsersIDsInZone()
getAllUsersIDsInZone
in interface AbstractZone
public Collection<AbstractUser> getAllUsersInZone()
getAllUsersInZone
in interface AbstractZone
AbstractZone.getAllUsersInZone()
@Deprecated private String getApple(AppiusClaudiusCaecus serverThread, String pass)
serverThread
- The AppiusClaudiusCaecus to the relevant userpass
- The plaintext password to be used
AppiusClaudiusCaecus.getApple(String)
public Set<String> getBadgesForRoom(AbstractRoom room)
room
- the room in question
public int getDynamicRoomNumber()
public String getHost()
getHost
in interface AbstractZone
public int getMaxUsers()
getMaxUsers
in interface AbstractZone
AbstractZone.getMaxUsers()
public String getMyServer()
myServer
public int getMyServerPort()
myServerPort
public String getName()
getName
in interface AbstractZone
AbstractZone.getName()
public AbstractRoom getNextLobby()
Get the next room which will accept an inbound user as the next lobby.
FIXME: This contains Tootsville-specific code. There should instead be a room variable to indicate that a room is a lobby.
FIXME: This code isn't used in Tootsville any more, anyways. Tootsville users get the map screen after logging in.
getNextLobby
in interface AbstractZone
public int getPort()
getPort
in interface AbstractZone
public Room getRoom(Integer room)
getRoom
in interface AbstractZone
room
- WRITEME
AbstractZone.getRoom(java.lang.Integer)
public Room getRoomByName(String string)
getRoomByName
in interface AbstractZone
string
- WRITEME
AbstractZone.getRoomByName(java.lang.String)
public Collection<AbstractRoom> getRoomList()
getRoomList
in interface AbstractZone
AbstractZone.getRoomList()
public String getRoomListSFSXML()
getRoomListSFSXML
in interface AbstractZone
AbstractZone.getRoomListSFSXML()
public int getRoomMaxUsers()
getRoomMaxUsers
in interface AbstractZone
AbstractZone.getRoomMaxUsers()
@Deprecated public User getSystemUser()
public String getURL()
getURL
in interface AbstractZone
public AbstractUser getUserByName(String buddy)
getUserByName
in interface AbstractZone
buddy
- WRITEME
AbstractZone.getUserByName(java.lang.String)
@Deprecated public Collection<AbstractUser> getUserList()
getAllUsersInZone()
public AbstractRoom getUserRoom(AbstractUser user)
getUserRoom
in interface AbstractZone
user
- WRITEME
AbstractZone.getUserRoom(AbstractUser)
public org.json.JSONObject getZoneData_JSON(AbstractUser user) throws org.json.JSONException
getZoneData_JSON
in interface AbstractZone
user
- the user from whose perspective we're collecting the
zone information
org.json.JSONException
- if something can't be encoded in JSONpublic org.json.JSONObject getZoneList_JSON(AbstractUser user)
getZoneList_JSON
in interface AbstractZone
user
- the user whose buddy list will be used to get the
buddy counts on each zone
@Deprecated public boolean handleLogin(String zoneName, String bigNick, String password, AppiusClaudiusCaecus serverThread)
zoneName
- Unused. Should be this zone's name, but the
parameter is ignored.bigNick
- The user's requested nickname (attempted user
name)password
- This is a bit of a misnomer. We actually are
checking for the secret key (CHAP cookie) for the
current channel, to which has been appended the user's
actual password, as presented as a hex-coded SHA1
digest. (In brief: pseudocode of sha1( cookie +
password ).toHex )serverThread
- This is the thread over which we are
communicating with the prospective user
public void handleRequest(String cmd, org.json.JSONObject jso, User u, int fromRoom)
cmd
- WRITEMEjso
- WRITEMEu
- WRITEMEfromRoom
- WRITEMEvoid handleServerReady()
@Deprecated protected void handleSpeak(AbstractRoom room, AbstractUser u, String toSpeak)
AbstractUser.speak(AbstractRoom, String)
room
- the room in which the speech is occurringu
- the speakertoSpeak
- WRITEMEAbstractUser.speak(AbstractRoom,String)
@Deprecated public void handleSpeak(int roomNumber, AbstractUser user, String speech)
AbstractUser.speak(AbstractRoom, String)
AbstractZone
handleSpeak
in interface AbstractZone
roomNumber
- the room in which the user is speakinguser
- the user speakingspeech
- the speech to be spokenAbstractZone.handleSpeak(int,AbstractUser,String)
@Deprecated public void handleSpeak(Integer roomNum, AbstractUser speaker, String toSpeak)
AbstractUser.speak(AbstractRoom, String)
AbstractUser.speak(AbstractRoom, String)
roomNum
- The room ID numberspeaker
- The user speakingtoSpeak
- The text to be spokenpublic void handleUserLost(User user)
user
- WRITEMEpublic void handleUserPart(String zone, AbstractRoom room, String uid, User user, String oldPlayerIndex)
zone
- WRITEMEroom
- WRITEMEuid
- WRITEMEuser
- WRITEMEoldPlayerIndex
- WRITEMEpublic int hashCode()
hashCode
in class Object
Object.hashCode()
public void init()
init
in interface AbstractZone
AbstractZone.init()
private void isItGood()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
in
- WRITEME
IOException
- WRITEME
ClassNotFoundException
- WRITEMEpublic void remove(AbstractUser thing)
remove
in interface AbstractZone
thing
- WRITEMEAbstractZone.remove(AbstractUser)
public void retire()
retire
in interface AbstractZone
@Deprecated public void sendAdminMessage(AbstractRoom room, User user, String message)
room
- Room the user is in.user
- User to send the message to.message
- Contents of the message being sent.AppiusClaudiusCaecus.sendAdminMessage(String, boolean)
private void sendBadges(AbstractUser user)
user
- the user to whom to send badgesprotected void sendBadPassword(String nick, AppiusClaudiusCaecus channel, User user, String zoneName, String password)
nick
- WRITEMEchannel
- WRITEMEuser
- WRITEMEzoneName
- WRITEMEpassword
- WRITEMEprotected void sendBuddyNotice(String buddyName, boolean isOnline, String roomMoniker, String roomTitle, User u, int room) throws org.json.JSONException
Sends a buddy notice message to the client
{ from: buddyNotice, status: true,
notice: { buddy: name, online: boolean,
room: moniker, roomName: title } }
buddyName
- WRITEMEisOnline
- WRITEMEroomMoniker
- WRITEMEroomTitle
- WRITEMEu
- WRITEMEroom
- WRITEME
org.json.JSONException
- WRITEME@Deprecated public void sendEarnings(int r, User u, String msg) throws org.json.JSONException
User.sendEarnings(AbstractRoom, String)
instead
r
- roomu
- usermsg
- WRITEME
org.json.JSONException
- WRITEME@Deprecated public void sendError_RAW(String xtnName, String message, AppiusClaudiusCaecus channel)
AppiusClaudiusCaecus.sendError_RAW(String,String)
instead
xtnName
- the command reporting an errormessage
- the error messagechannel
- the server thread to receive the errorAppiusClaudiusCaecus.sendError_RAW(java.lang.String, java.lang.String)
public void sendErrorReply(String source, String error, org.json.JSONObject result, User u, int room) throws org.json.JSONException
source
- The method returning the error messageerror
- The error messageresult
- The payload, if any. May be altered.u
- The user to whom to send the success replyroom
- The room in which the user is standing
org.json.JSONException
- WRITEME@Deprecated protected void sendLoginPacket(String zoneName, String nick, String password, AppiusClaudiusCaecus serverThread, User user, LinkedList<AppiusClaudiusCaecus> recipients)
zoneName
- WRITEMEnick
- WRITEMEpassword
- WRITEMEserverThread
- WRITEMEuser
- WRITEMErecipients
- WRITEME@Deprecated protected void sendLogKO(AppiusClaudiusCaecus recipient)
AppiusClaudiusCaecus.sendLogKO()
instead
recipient
- WRITEME@Deprecated protected void sendLogKO(AppiusClaudiusCaecus recipient, String messageText)
AppiusClaudiusCaecus.sendLogKO(String)
instead
recipient
- WRITEMEmessageText
- WRITEMEpublic void sendModMessage(AbstractRoom room, User user, String message)
Sends an (anonymous) moderator message to the user
room
- The room the user is inuser
- The user to whom to send the messagemessage
- The moderator message to be sentprotected void sendNoSuchUser(LinkedList<AppiusClaudiusCaecus> recipients, String nick, String zoneName, String password)
recipients
- WRITEMEnick
- WRITEMEzoneName
- WRITEMEpassword
- WRITEMEpublic void sendOops(User u)
u
- the user to whom we want to send the Oops message@Deprecated public void sendOops(User u, AbstractRoom room)
sendOops(User)
u
- WRITEMEroom
- WRITEME@Deprecated void sendResponse(org.json.JSONObject result, Integer room, AbstractUser u, AppiusClaudiusCaecus recipient)
AppiusClaudiusCaecus.sendResponse(JSONObject, Integer, AbstractUser)
directly
result
- WRITEMEroom
- WRITEMEu
- WRITEMErecipient
- WRITEME@Deprecated void sendResponse(org.json.JSONObject result, Integer room, AbstractUser u, Collection<AppiusClaudiusCaecus> recipients)
AppiusClaudiusCaecus.sendResponse(JSONObject, Integer, AbstractUser)
directly
result
- the JSON result object (ready to send)room
- the room in which the event happened, if any.u
- the sender of the messagerecipients
- the set of recipientspublic void sendSuccessReply(String source, org.json.JSONObject resultIn, AbstractUser u, int room) throws org.json.JSONException
source
- The method returning the success messageresultIn
- The payload, if any. May be altered.u
- The user to whom to send the success replyroom
- The room in which the user is standing
org.json.JSONException
- WRITEME@Deprecated public void sendSuccessReply(String source, org.json.JSONObject resultIn, AbstractUser u, int room, AppiusClaudiusCaecus recipient) throws org.json.JSONException
AppiusClaudiusCaecus.sendSuccessReply(String,JSONObject,AbstractUser,int)
instead
source
- WRITEMEresultIn
- WRITEMEu
- WRITEMEroom
- WRITEMErecipient
- WRITEME
org.json.JSONException
- WRITEME@Deprecated public void sendSuccessReply(String source, org.json.JSONObject resultIn, AbstractUser u, int room, LinkedList<AppiusClaudiusCaecus> recipients) throws org.json.JSONException
sendSuccessReply(String, JSONObject, AbstractUser,int)
source
- WRITEMEresultIn
- WRITEMEu
- WRITEMEroom
- WRITEMErecipients
- WRITEME
org.json.JSONException
- WRITEMEvoid sendUserLists(AbstractUser user) throws org.json.JSONException
user
- The user who will receive an update of their user
lists
org.json.JSONException
- If the data fails to serialize properlyvoid sendWardrobe(AbstractUser user, Object ignored, int room) throws org.json.JSONException
user
- WRITEMEignored
- Ignored parameter. Null is a good answer.room
- WRITEME
org.json.JSONException
- WRITEMEpublic void setAutoJoinRoom(int id)
setAutoJoinRoom
in interface AbstractZone
id
- WRITEMEAbstractZone.setAutoJoinRoom(int)
public void setBadge(String badge, AbstractRoom room)
setBadge
in interface AbstractZone
badge
- WRITEMEroom
- WRITEMEpublic void setMyServer(String server)
server
- myServer
public void setMyServerPort(int serverPort)
serverPort
- myServerPort
public String spawnNewZone()
spawnNewZone
in interface AbstractZone
AbstractZone.spawnNewZone()
public void spawnZone(String zoneName)
spawnZone
in interface AbstractZone
zoneName
- the name of the new zonepublic void spawnZone(String zoneName, String image)
zoneName
- the name of the new zoneimage
- the background nugget iconpublic void tellEaves(AbstractUser user, AbstractRoom room, String verb, String note)
tellEaves
in interface AbstractZone
user
- The user who has actedroom
- The room in which s/he has actedverb
- The action s/he has takennote
- Note(s) about the actionpublic void trace(String string)
trace
in interface AbstractZone
string
- WRITEMEAbstractZone.trace(java.lang.String)
public void writeExternal(ObjectOutput out) throws IOException
IOException
org.starhope.appius.via.ViaAppia#writeExternal(java.io.ObjectOutput)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |