|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.parlor.client.Invitation
public class Invitation
The invitation class is used to track information related to outstanding invitations generated by or targeted to this client.
| Field Summary | |
|---|---|
GameConfig |
config
The configuration of the game to be created. |
int |
inviteId
The unique id for this invitation (as assigned by the server). |
com.threerings.util.Name |
opponent
The name of the other user involved in this invitation. |
| Fields inherited from interface com.threerings.parlor.data.ParlorCodes |
|---|
ALREADY_AT_TABLE, BANNED_FROM_TABLE, GAME_ALREADY_STARTED, INVALID_TABLE_POSITION, INVITATION_ACCEPTED, INVITATION_COUNTERED, INVITATION_REFUSED, INVITEE_NOT_ONLINE, MUST_BE_CREATOR, NO_SELF_BOOT, NO_SUCH_TABLE, NOT_AT_TABLE, PARLOR_GROUP, TABLE_POSITION_OCCUPIED |
| Fields inherited from interface com.threerings.presents.data.InvocationCodes |
|---|
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR |
| Constructor Summary | |
|---|---|
Invitation(ParlorContext ctx,
ParlorService pservice,
com.threerings.util.Name opponent,
GameConfig config,
InvitationResponseObserver observer)
Constructs a new invitation record. |
|
| Method Summary | |
|---|---|
void |
accept()
Accepts this invitation. |
void |
cancel()
Cancels this invitation. |
void |
counter(GameConfig config,
InvitationResponseObserver observer)
Counters this invitation with an invitation with different game configuration parameters. |
void |
inviteReceived(int inviteId)
Called in response to a successful ParlorService.invite(com.threerings.util.Name, com.threerings.parlor.game.data.GameConfig, com.threerings.parlor.client.ParlorService.InviteListener) request. |
void |
refuse(String message)
Refuses this invitation. |
void |
requestFailed(String reason)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int inviteId
public com.threerings.util.Name opponent
public GameConfig config
| Constructor Detail |
|---|
public Invitation(ParlorContext ctx,
ParlorService pservice,
com.threerings.util.Name opponent,
GameConfig config,
InvitationResponseObserver observer)
| Method Detail |
|---|
public void accept()
public void refuse(String message)
message - the message to deliver to the inviting user
explaining the reason for the refusal or null if no message is to
be provided.public void cancel()
public void counter(GameConfig config,
InvitationResponseObserver observer)
config - the updated game configuration.observer - the entity that will be notified if this
counter-invitation is accepted, refused or countered.public void inviteReceived(int inviteId)
ParlorService.InviteListenerParlorService.invite(com.threerings.util.Name, com.threerings.parlor.game.data.GameConfig, com.threerings.parlor.client.ParlorService.InviteListener) request.
inviteReceived in interface ParlorService.InviteListenerpublic void requestFailed(String reason)
requestFailed in interface com.threerings.presents.client.InvocationService.InvocationListenerpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||