Package net.tomp2p.message.Message

Examples of net.tomp2p.message.Message.Type


     *            Set to true if the communication should be UDP, default is TCP
     * @return FutureResponse that stores which content keys have been stored.
     */
    public FutureResponse put(final PeerAddress remotePeer, final PutBuilder putBuilder,
            final ChannelCreator channelCreator) {
        final Type request = putBuilder.isProtectDomain() ? Type.REQUEST_2 : Type.REQUEST_1;
        return put(remotePeer, putBuilder, request, channelCreator);
    }
View Full Code Here


     *            Set to true if the communication should be UDP, default is TCP
     * @return FutureResponse that stores which content keys have been stored.
     */
    public FutureResponse putIfAbsent(final PeerAddress remotePeer, final PutBuilder putBuilder,
            final ChannelCreator channelCreator) {
        final Type request;
        if (putBuilder.isProtectDomain()) {
            request = Type.REQUEST_4;
        } else {
            request = Type.REQUEST_3;
        }
View Full Code Here

        } else {
            dataMap = new DataMap(putBuilder.locationKey(), putBuilder.domainKey(),
                    putBuilder.versionKey(), putBuilder.dataMapContent());
        }
       
        final Type type;
        if (putBuilder.changePublicKey()!=null) {
          //change domain protection key
          type = Type.REQUEST_2;
        } else {
          //change entry protection key, or set timestamp
View Full Code Here

     * @return FutureResponse that stores which content keys have been stored.
     */
    public FutureResponse add(final PeerAddress remotePeer, final AddBuilder addBuilder,
            ChannelCreator channelCreator) {
        Utils.nullCheck(remotePeer, addBuilder.locationKey(), addBuilder.domainKey());
        final Type type;
        if (addBuilder.isProtectDomain()) {
            if (addBuilder.isList()) {
                type = Type.REQUEST_4;
            } else {
                type = Type.REQUEST_2;
View Full Code Here

          command = RPC.Commands.DIGEST_META_VALUES.getNr();
        } else {
          command = RPC.Commands.DIGEST.getNr();
        }
       
        final Type type;
        if (getBuilder.isAscending() && getBuilder.isBloomFilterAnd()) {
            type = Type.REQUEST_1;
        } else if(!getBuilder.isAscending() && getBuilder.isBloomFilterAnd()){
            type = Type.REQUEST_2;
        } else if(getBuilder.isAscending() && !getBuilder.isBloomFilterAnd()){
View Full Code Here

        }
    }

    public FutureResponse get(final PeerAddress remotePeer, final GetBuilder getBuilder,
            final ChannelCreator channelCreator) {
      final Type type;
        if (getBuilder.isAscending() && getBuilder.isBloomFilterAnd()) {
            type = Type.REQUEST_1;
        } else if(!getBuilder.isAscending() && getBuilder.isBloomFilterAnd()){
            type = Type.REQUEST_2;
        } else if(getBuilder.isAscending() && !getBuilder.isBloomFilterAnd()){
View Full Code Here

        }
    }

  public FutureResponse getLatest(final PeerAddress remotePeer, final GetBuilder getBuilder,
      final ChannelCreator channelCreator, final RPC.Commands command) {
    final Type type = Type.REQUEST_1;
    final Message message = createMessage(remotePeer, command.getNr(), type);

    if (getBuilder.isSign()) {
      message.publicKeyAndSign(getBuilder.keyPair());
    }
View Full Code Here

TOP

Related Classes of net.tomp2p.message.Message.Type

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.