Class LogoutRequest

  • All Implemented Interfaces:
    sfs2x.client.requests.IRequest

    public class LogoutRequest
    extends 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 Detail

      • KEY_ZONE_NAME

        public static final java.lang.String KEY_ZONE_NAME
        * API internal usage only *
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • validate

        public void validate​(ISmartFox sfs)
                      throws sfs2x.client.exceptions.SFSValidationException
        * API internal usage only *
        Throws:
        sfs2x.client.exceptions.SFSValidationException
      • execute

        public void execute​(ISmartFox sfs)
        * API internal usage only *