Package org.cspoker.client.pokersource.listeners

Examples of org.cspoker.client.pokersource.listeners.SerialListener


  }
 
  @Override
  public RemoteServerContext login(String username, String password) throws LoginException {
    try {
      SerialListener serial = new SerialListener();
      TransListener transListener = new TransListener();
      final PokersourceConnection conn = new PokersourceConnection(server);
      conn.addListeners(serial, transListener);
      conn.send(new Login(username, password));
      serialObtained.await();
      conn.removeListeners(serial, transListener);
      return new PSServerContext(conn, serial.getSerial());
    } catch (IOException e) {
      throw new LoginException(e.getMessage());
    } catch (JSONException e) {
      throw new LoginException(e.getMessage());
    } catch (InterruptedException e) {
View Full Code Here

TOP

Related Classes of org.cspoker.client.pokersource.listeners.SerialListener

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.