Package org.menacheri.jetclient.app.impl

Examples of org.menacheri.jetclient.app.impl.SessionFactory


    LoginBuilder builder = new LoginBuilder().username("user")
        .password("pass").connectionKey("Zombie_ROOM_1_REF_KEY_1")
        .jetserverTcpHostName("localhost").tcpPort(18090)
        .jetserverUdpHostName("255.255.255.255").udpPort(18090);
    LoginHelper loginHelper = builder.build();
    SessionFactory sessionFactory = new SessionFactory(loginHelper);
    ScheduledExecutorService taskExecutor = Executors.newSingleThreadScheduledExecutor();
    for(int i = 1; i<=50; i++){
      Session session = sessionFactory.createAndConnectSession();
      addDefaultHandlerToSession(session);
      GamePlay task = null;
      if((i % 2) == 0){
        task = new GamePlay(IAM.DEFENDER, session);
      }
View Full Code Here


    LoginBuilder builder = new LoginBuilder().username("user")
        .password("pass").connectionKey("Zombie_ROOM_1_REF_KEY_1")
        .jetserverTcpHostName("localhost").tcpPort(18090)
        .jetserverUdpHostName("255.255.255.255").udpPort(18090);
    LoginHelper loginHelper = builder.build();
    SessionFactory sessionFactory = new SessionFactory(loginHelper);
    ScheduledExecutorService taskExecutor = Executors.newSingleThreadScheduledExecutor();
    for(int i = 1; i<=50; i++){
      Session session = sessionFactory.createAndConnectSession(getDefaultHandler());
      // Set the reconnect policy for reconnection.
      session.setReconnectPolicy(new ReconnectPolicy.ReconnectNTimes(2, 2000, loginHelper));
      GamePlay task = null;
      if((i % 2) == 0){
        task = new GamePlay(IAM.DEFENDER, session);
View Full Code Here

    LoginBuilder builder = new LoginBuilder().username("user")
        .password("pass").connectionKey("Zombie_ROOM_1_REF_KEY_1")
        .jetserverTcpHostName("localhost").tcpPort(18090)
        .jetserverUdpHostName("255.255.255.255").udpPort(18090);
    LoginHelper loginHelper = builder.build();
    SessionFactory sessionFactory = new SessionFactory(loginHelper);
    Session session = sessionFactory.createAndConnectSession();
    AbstractSessionEventHandler handler = new AbstractSessionEventHandler(
        session)
    {
      @Override
      public void onDataIn(Event event)
View Full Code Here

TOP

Related Classes of org.menacheri.jetclient.app.impl.SessionFactory

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.