public enum SFSEventType extends java.lang.Enum<SFSEventType>
Enum Constant and Description |
---|
__GRID_NODE_BECOMES_MASTER |
__TRACE_MESSAGE |
BUDDY_ADD
This event is fired when a User is added in the Buddy List of another client.
|
BUDDY_BLOCK
This event is fired when a Buddy is blocked in User's Buddy List.
|
BUDDY_LIST_INIT
This event is fired when a User initializes his Buddy List.
|
BUDDY_MESSAGE
This event is fired when a Buddy Message is sent between two Buddies.
|
BUDDY_ONLINE_STATE_UPDATE
This event is fired when a Buddy changes his online state.
|
BUDDY_REMOVE
This event is fired when a User is removed in the Buddy List of another client.
|
BUDDY_VARIABLES_UPDATE
This event is fired when a Buddy Variables are set by a User.
|
FILE_UPLOAD
This event is fired when one or more files have been uploaded by a User connected in the current Zone.
|
GAME_INVITATION_FAILURE
This event is fired after a private SFSGame has finished the cycle of invitations.
|
GAME_INVITATION_SUCCESS
This event is fired after a private SFSGame has finished the cycle of invitations.
|
PLAYER_TO_SPECTATOR
This event is fired when a User joined in a Game Room as player changes turns into a Spectator.
|
PRIVATE_MESSAGE
This event is fired when a private message is sent by a client.
|
PUBLIC_MESSAGE
This event is fired when a public message is sent by a client.
|
ROOM_ADDED
This event is fired after a new Room was created in the current Zone
Level: Zone
Parameters:
SFSEventParam.ZONE : the Zone ( Zone )
SFSEventParam.ROOM : the Room ( Room )
|
ROOM_REMOVED
This event is fired after a Room was removed from the current Zone
Level: Zone
Parameters:
SFSEventParam.ZONE : the Zone ( Zone )
SFSEventParam.ROOM : the Room< ( Room )/li>
|
ROOM_VARIABLES_UPDATE
This event is fired when a one or more Room Variables are set.
|
SERVER_READY
The event is fired by SmartFox when the server engine has completed the boot phase.
|
SPECTATOR_TO_PLAYER
This event is fired when a User joined in a Game Room as spectator changes turns into a Player.
|
USER_DISCONNECT
The event is fired after a User disconnects or is disconnected.
|
USER_JOIN_ROOM
The event is fired after a User has joined a Room.
|
USER_JOIN_ZONE
The event is fired after a successful User login.
|
USER_LEAVE_ROOM
The event is fired after a User has left a Room.
|
USER_LOGIN
The event is fired when a User sends a login request.
|
USER_LOGOUT
The event is fired after a User logout.
|
USER_RECONNECTION_SUCCESS
The event is fired when the HRC (highly resilient connection) feature is turned on and a User was successfully reconnected.
|
USER_RECONNECTION_TRY
The event is fired when the HRC (highly resilient connection) feature is turned on and a User is trying to reconnect.
|
USER_VARIABLES_UPDATE
This event is fired when a one or more User Variables are set.
|
Modifier and Type | Method and Description |
---|---|
static SFSEventType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SFSEventType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SFSEventType SERVER_READY
Level: Zone
Parameters: none
public static final SFSEventType USER_LOGIN
SFSLoginException
to stop the flow of the login.
NOTE: The Zone must be configured with the customLogin attribute set to true.
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.SESSION
: the User session ( Session
)SFSEventParam.LOGIN_NAME
: the User name ( String
)SFSEventParam.LOGIN_PASSWORD
: (optional) the password ( String
)SFSEventParam.LOGIN_IN_DATA
: (optional) the custom user data ( SFSObject
)SFSEventParam.LOGIN_OUT_DATA
: (optional) the outgoing custom object ( SFSObject
)public static final SFSEventType USER_JOIN_ZONE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)public static final SFSEventType USER_LOGOUT
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone< ( Zone
)/li>
SFSEventParam.USER
: the User ( User
)SFSEventParam.JOINED_ROOMS
: the list of Rooms previously joined by the User ( List
)SFSEventParam.PLAYER_IDS_BY_ROOM
: a map of PlayerId by Room, for each Room joined by the User ( Map
of Room, Integer)public static final SFSEventType USER_JOIN_ROOM
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room that was joined ( Room
)SFSEventParam.USER
: the User ( User
)public static final SFSEventType USER_LEAVE_ROOM
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room that was left ( Room
)SFSEventParam.USER
: the User ( User
)SFSEventParam.PLAYER_ID
: the previous playerId of the User in that Room ( Integer
)public static final SFSEventType USER_DISCONNECT
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)SFSEventParam.JOINED_ROOMS
: the list of Rooms previously joined by the User ( List
or Room )SFSEventParam.PLAYER_IDS_BY_ROOM
: a map of PlayerId by Room, for each Room joined by the User ( Map
of Room, Integer)SFSEventParam.DISCONNECTION_REASON
: the reason of the disconnection (where it is possible to detect it) ( ClientDisconnectionReason
)ClientDisconnectionReason
public static final SFSEventType USER_RECONNECTION_TRY
When a User looses connection for an unknown reason the client will attempt to re-connect immediately. If the operation is done within the expected time the User connection will be resumed transparently. The User does not loose its current state and it's not removed from the server so, for example, the game can continue from the point it was stopped (if turn-based).
This event notifies the developer that the User is in "reconnection mode". The event can be used to stop the game if necessary or simply notify the other player of the temporary change. The reconnection time is specified in the Zone configuration using the
setting.
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)public static final SFSEventType USER_RECONNECTION_SUCCESS
When a User looses connection for an unknown reason the client will attempt to re-connect immediately. If the operation is done within the expected time the User connection will be resumed transparently. The User does not loose its current state and it's not removed from the server so, for example, the game can continue from the point it was stopped (if turn-based).
This event notifies the developer that the User was reconnected. The event can be used to re-start the game if necessary or simply notify the other players.
The reconnection time is specified in the Zone configuration using the
setting. In case the User is not able to reconnect a regular
USER_DISCONNECT
event will be fired.
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)public static final SFSEventType ROOM_ADDED
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)public static final SFSEventType ROOM_REMOVED
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room< ( Room
)/li>
public static final SFSEventType PUBLIC_MESSAGE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)SFSEventParam.USER
: the sender of the message ( User
)SFSEventParam.MESSAGE
: the message ( String
)SFSEventParam.OBJECT
: the message ( ISFSObject
)public static final SFSEventType PRIVATE_MESSAGE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)SFSEventParam.USER
: the sender of the message ( User
)SFSEventParam.RECIPIENT
: the recipient of the message ( User
)SFSEventParam.MESSAGE
: the message ( String
)SFSEventParam.OBJECT
: the message ( ISFSObject
)public static final SFSEventType ROOM_VARIABLES_UPDATE
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)SFSEventParam.USER
: the user setting the variables ( User
)SFSEventParam.VARIABLES
: the variables ( List
of RoomVariable )SFSEventParam.VARIABLES_MAP
: the variables as key-value map ( Map
of String, RoomVariable )public static final SFSEventType USER_VARIABLES_UPDATE
Level: Zone, Room (Room Level added since version 2.8.x)
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the user setting the variables ( User
)SFSEventParam.VARIABLES
: the variables ( List
of UserVariable )SFSEventParam.VARIABLES_MAP
: the variables as key-value map ( Map
of String, UserVariable )public static final SFSEventType SPECTATOR_TO_PLAYER
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)SFSEventParam.USER
: the User ( User
)SFSEventParam.PLAYER_ID
: the new player Id assigned to the User that was switched ( Integer
)public static final SFSEventType PLAYER_TO_SPECTATOR
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Room ( Room
)SFSEventParam.USER
: the User ( User
)public static final SFSEventType BUDDY_ADD
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the owner of the Buddy List ( User
)SFSBuddyEventParam.BUDDY
: the added Buddy ( Buddy
)public static final SFSEventType BUDDY_REMOVE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the owner of the Buddy List ( User
)SFSBuddyEventParam.BUDDY
: the removed Buddy ( Buddy
)public static final SFSEventType BUDDY_BLOCK
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the owner of the Buddy List ( User
)SFSBuddyEventParam.BUDDY
: the blocked Buddy ( Buddy
)public static final SFSEventType BUDDY_VARIABLES_UPDATE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)SFSEventParam.VARIABLES
: the Buddy Variables ( List
of BuddyVariable )SFSEventParam.VARIABLES_MAP
: the variables as key-value map ( Map
of String, BuddyVariable )public static final SFSEventType BUDDY_ONLINE_STATE_UPDATE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User( User
)SFSBuddyEventParam.BUDDY_IS_ONLINE
: the new state: true == online, false == offline. ( Boolean
)public static final SFSEventType BUDDY_MESSAGE
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the owner of the Buddy List ( User
)SFSEventParam.RECIPIENT
: the blocked Buddy ( Buddy
)SFSEventParam.MESSAGE
: the blocked Buddy ( String
)SFSEventParam.OBJECT
: the message ( ISFSObject
)public static final SFSEventType BUDDY_LIST_INIT
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the owner of the Buddy List ( User
)SFSBuddyEventParam.BUDDY_LIST
: the User's BuddyList ( BuddyList
)public static final SFSEventType GAME_INVITATION_SUCCESS
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Game Room ( Room
)public static final SFSEventType GAME_INVITATION_FAILURE
Level: Zone, Room
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.ROOM
: the Game Room ( Room
)public static final SFSEventType FILE_UPLOAD
Level: Zone
Parameters:
SFSEventParam.ZONE
: the Zone ( Zone
)SFSEventParam.USER
: the User ( User
)SFSEventParam.UPLOAD_FILE_LIST
: a List of UploadedFile
elementsSFSEventParam.UPLOAD_HTTP_PARAMS
: a Map of custom parameters. Each entry in the map provides the name (String) and the relative value (String) of the parameter.public static final SFSEventType __TRACE_MESSAGE
public static final SFSEventType __GRID_NODE_BECOMES_MASTER
public static SFSEventType[] values()
for (SFSEventType c : SFSEventType.values()) System.out.println(c);
public static SFSEventType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null