|
JMS Conector demo (OC4J 10g R3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectGameEvent
Class used to carry information back and forth between dealer and players.
This class implements java.io.Serializable, which makes it easy
to pass instances of this class as javax.jms.ObjectMessages.
| Field Summary | |
static int |
PING
This GameEvent type is used to prime communications. |
java.lang.String |
player
Name of player who is the subject of this GameEvent. |
static int |
PLAYER_ACCEPTED
This GameEvent type indicates that the dealer has accepted the player's request to join the game.
|
static int |
PLAYER_GOT_VALUE
This GameEvent type indicates the player's new (or kept) value.
|
static int |
PLAYER_JOIN_REQUEST
This GameEvent type is used when the player would like to join a game. |
static int |
PLAYER_PASSES
This GameEvent type signifies the player wishes to keep the
player's present value.
|
static int |
PLAYER_REDRAWS
This GameEvent type signifies the player wishes to receive a new value. |
static int |
PLAYER_REJECTED
This GameEvent type indicates that the dealer has rejected the player's request to join the game.
|
static int |
TURN_NOTIFICATION
This GameEvent type indicates the player whose turn it is. |
int |
type
Indicates type of GameEvent. |
int |
value
Game value received (randomly generated) or kept by player player.
|
| Constructor Summary | |
(package private) |
GameEvent()
|
| Method Summary | |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int PING
Player.primeCommunications(MyChannel, MyChannel) for a
more detailed discussion of why this is necessary. (The Player
initiates a PING. The Dealer acknowledges the reception of PING
with another PING.)
This GameEvent type is sent both by a player to the dealer and by the
dealer to the players.
public static final int PLAYER_JOIN_REQUEST
public static final int PLAYER_REDRAWS
public static final int PLAYER_PASSES
player wishes to keep the
player's present value.
Each player gets an initial value and one turn. During the player's
turn, the player may either "redraw" (get a new value) or "pass" (keep
the initial value).
This GameEvent type is sent by a player to the dealer.
public static final int PLAYER_ACCEPTED
player's request to join the game.
This GameEvent type is sent by the dealer to the players.
public static final int PLAYER_REJECTED
player's request to join the game.
The game starts once three players have joined the game. Players are not
allowed to enter after the game has already started, so subsequent
join requests are rejected.
This GameEvent type is sent by the dealer to the players.
public static final int PLAYER_GOT_VALUE
player's new (or kept) value.
This GameEvent is sent once the player redraws
or passes.
This GameEvent type is sent by the dealer to the players.
public static final int TURN_NOTIFICATION
player whose turn it is.
public int type
public java.lang.String player
type == PING.
player may be "Dealer" when type == PLAYER_GOT_VALUE.
public int value
player.
This field is only valid in a message when type == PLAYER_GOT_VALUE.
| Constructor Detail |
GameEvent()
| Method Detail |
public java.lang.String toString()
|
JMS Conector demo (OC4J 10g R3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||