Package net.alteiar.newversion.shared

Examples of net.alteiar.newversion.shared.SendingKey


    }
  }

  protected void sendObject(Connection conn, UniqueID guid, ObjectSender send) {
    Encaps obj = new Encaps(send);
    sendingUsers.put(new SendingKey(guid, conn), obj);

    sendTCPMessage(conn, obj);
  }
View Full Code Here


  }

  private final Encaps messageReadyReceived(Connection conn,
      MessageReadyToReceive obj) {
    Encaps sended = sendingUsers.get(new SendingKey(obj.getId(), conn));

    if (sended.isFinish()) {
      sendingUsers.remove(new SendingKey(obj.getId(), conn));

      System.gc();
    }

    return sended;
View Full Code Here

    }
  }

  protected void sendObject(Connection conn, UniqueID guid, ObjectSender send) {
    Encaps obj = new Encaps(send);
    sendingUsers.put(new SendingKey(guid, conn), obj);

    sendTCPMessage(conn, obj);
  }
View Full Code Here

   * @param obj
   * @return the reply we should send
   */
  private final Encaps messageReadyReceived(Connection conn,
      MessageReadyToReceive obj) {
    Encaps sended = sendingUsers.get(new SendingKey(obj.getId(), conn));

    if (sended.isFinish()) {
      sendingUsers.remove(new SendingKey(obj.getId(), conn));

      System.gc();
    }

    return sended;
View Full Code Here

  }

  protected void sendObject(Connection conn, ChunkObjectSend send) {
    Encaps encap = new Encaps(send);

    SendingKey key = new SendingKey(send.getGuid(), conn);

    if (!sendingObject.containsKey(key)) {
      sendingObject.put(key, encap);
      sendTCPMessage(conn, encap.getNextChunk());
    } else {
View Full Code Here

  }

  private final IUniqueObject messageReadyReceived(Connection conn,
      MessageReadyToReceive obj) {
    IUniqueObject reply = null;
    Encaps sended = sendingObject.get(new SendingKey(obj.getId(), conn));

    if (sended == null) {
      System.out.println("impossible d'envoyer " + obj.getId());
    }
    if (sended.isFinish()) {
      reply = sended.getEndChunk();
      sendingObject.remove(new SendingKey(obj.getId(), conn));

      System.gc();
    } else {
      reply = sended.getNextChunk();
    }
View Full Code Here

TOP

Related Classes of net.alteiar.newversion.shared.SendingKey

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.