sfs2x.client.requests
Class LogoutRequest

java.lang.Object
  extended by sfs2x.client.requests.BaseRequest
      extended by sfs2x.client.requests.LogoutRequest
All Implemented Interfaces:
sfs2x.client.requests.IRequest

public class LogoutRequest
extends sfs2x.client.requests.BaseRequest

Logs the user out of the current server Zone.

The user is notified of the logout operation by means of the logout event. This doesn't shut down the connection, so the user will be able to login again in the same Zone or in a different one right after the confirmation event.

Example
The following example performs a logout from the current Zone:

private void someMethod() { sfs.addEventListener(SFSEvent.LOGOUT, new IEventListener() { public void dispatch(BaseEvent evt) throws SFSException { System.out.println("Logout executed!"); } });

// Logout sfs.send(new LogoutRequest()); }

See Also:
SFSEvent.LOGOUT

Field Summary
static java.lang.String KEY_ZONE_NAME
          *Private*
 
Fields inherited from class sfs2x.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserVariables, SpectatorToPlayer, SubscribeRoomGroup, UnsubscribeRoomGroup
 
Constructor Summary
LogoutRequest()
          Creates a new LogoutRequest instance.
 
Method Summary
 void execute(SmartFox sfs)
           
 void validate(SmartFox sfs)
          *Private*
 
Methods inherited from class sfs2x.client.requests.BaseRequest
getId, getMessage, getTargetController, isEncrypted, setEncrypted, setId, setTargetController
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_ZONE_NAME

public static final java.lang.String KEY_ZONE_NAME
*Private*

See Also:
Constant Field Values
Constructor Detail

LogoutRequest

public LogoutRequest()
Creates a new LogoutRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.

See Also:
SmartFox.send(sfs2x.client.requests.IRequest)
Method Detail

validate

public void validate(SmartFox sfs)
              throws sfs2x.client.exceptions.SFSValidationException
*Private*

Throws:
sfs2x.client.exceptions.SFSValidationException

execute

public void execute(SmartFox sfs)