Package net.tomp2p.message

Examples of net.tomp2p.message.Message.intValue()


        return futureDone.failed("Invalid GCM configuration");
      } else {
        // add the registration ID, the GCM authentication key and the map update interval
        message.buffer(RelayUtils.encodeString(gcmServerCredentials.registrationId()));
        message.buffer(RelayUtils.encodeString(gcmServerCredentials.senderAuthenticationKey()));
        message.intValue(mapUpdateInterval);
      }
    }

    LOG.debug("Setting up relay connection to peer {}, message {}", candidate, message);
    final FuturePeerConnection fpc = peer.createPeerConnection(candidate);
View Full Code Here


                message.setDataMap(new DataMap(dataMap));
            }
        }
       
        message.key(messageKey);
        message.intValue(0);
        message.udp(isUDP());
       
        peer.broadcastRPC().broadcastHandler().receive(message);
    }
   
View Full Code Here

                    digestInfo = peerBean().digestStorage().digest(from, to, -1, true);
                } else {
                  LOG.warn("did not search for anything");
                  digestInfo = new DigestInfo();
                }
                responseMessage.intValue(digestInfo.size());
                responseMessage.key(digestInfo.keyDigest());
                responseMessage.key(digestInfo.contentDigest());
            } else if (message.type() == Type.REQUEST_3) {
              final DigestInfo digestInfo;
              if(peerBean().digestTracker() == null) {
View Full Code Here

                digestInfo = peerBean().digestTracker().digest(locationKey, domainKey, contentKey);
                if (digestInfo.size() == 0) { 
                  LOG.debug("No entry found on peer {}", message.recipient());
                }
              }
                responseMessage.intValue(digestInfo.size());
            }
            else if (message.type() == Type.REQUEST_4) {
              synchronized (peerBean().peerStatusListeners()) {
                for (PeerStatusListener peerStatusListener : peerBean().peerStatusListeners()) {
              peerStatusListener.peerFailed(message.sender(), new PeerException(AbortCause.SHUTDOWN, "shutdown"));
View Full Code Here

    }

    public FutureResponse send(final PeerAddress remotePeer, final BroadcastBuilder broadcastBuilder,
            final ChannelCreator channelCreator, final ConnectionConfiguration configuration) {
        final Message message = createMessage(remotePeer, RPC.Commands.BROADCAST.getNr(), Type.REQUEST_FF_1);
        message.intValue(broadcastBuilder.hopCounter());
        message.key(broadcastBuilder.messageKey());
        if (broadcastBuilder.dataMap() != null) {
            message.setDataMap(new DataMap(broadcastBuilder.dataMap()));
        }
        final FutureResponse futureResponse = new FutureResponse(message);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.