Package org.knapper.client.core

Examples of org.knapper.client.core.IClientSession


      }

      public void widgetSelected(SelectionEvent event) {
        String messageText = chatMessageText.getText();
       
        IClientSession session = KnapperClientCore.getDefault()
          .getClientSession();
       
        session.sendMessage(
            new ChatMessageBody(
                messageText,
                session.getPlayer().getNickName()));
       
        chatMessageText.setText("");
        chatMessageText.setFocus();
      }
    });
View Full Code Here


  }

  private void sendMessage() {
    String messageText = chatMessageText.getText();
   
    IClientSession session = KnapperClientCore.getDefault()
      .getClientSession();
   
    session.sendMessage(
        new ChatMessageBody(
            messageText,
            session.getPlayer().getNickName()));
   
    chatMessageText.setText("");
    chatMessageText.setFocus();
  }
View Full Code Here

          username,
          password,
          username);
     
      final KnapperClientCore clientCore = KnapperClientCore.getDefault();
      IClientSession client = clientCore.getClientSession();
     
      if (listener == null) {
        listener = new IEventListener() {
 
          public void handleEvent(IEvent event) {
            if (event instanceof ClientChangeEvent) {
              ClientChangeEvent cce = (ClientChangeEvent) event;
              if (cce.getChange() == ClientChangeEvent.AUTHENTICATED) {
                clientCore.getEventService().removeEventListener(listener);
                fAuthenticated = true;
              }
            }
           
          }
         
        };
     
        clientCore.getEventService().addEventListener(listener);
      }
     
      client.startClient(cld);

    } else {
      MessageDialog.openError(
          getSplash(),
          "Authentication Failed"//NON-NLS-1
View Full Code Here

TOP

Related Classes of org.knapper.client.core.IClientSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.