Examples of toStringUtf8()


Examples of com.google.protobuf.ByteString.toStringUtf8()

       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

        final AtomicBoolean inRedirectLoop = new AtomicBoolean(false);
        numDone.set(0);
        for (int i=0; i<numSubscribers; i++) {
            ByteString subId = ByteString.copyFromUtf8("sub-" + i);
            if (logger.isDebugEnabled()) {
                logger.debug("subscriber " + subId.toStringUtf8() + " subscribes topic " + topic.toStringUtf8());
            }
            subscriber.asyncSubscribe(topic, subId, CreateOrAttach.CREATE_OR_ATTACH,
                new Callback<Void>() {
               
                    private void tick() {
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

                    ByteString subId;
                    while (true) {
                        subId = subscribers.take();
                       
                        if (logger.isDebugEnabled()) {
                            logger.debug("subscriber " + subId.toStringUtf8() + " subscribes topic " + topic.toStringUtf8());
                        }
                        subscriber.asyncSubscribe(topic, subId, CreateOrAttach.CREATE_OR_ATTACH,
                            new SubCallback(subId), null);
                    }
                    // subscriber.asyncSubscribe(topic, subscriberId, mode, callback, context)
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

                        public void safeProcessResult(int rc, String path, Object ctx, byte[] data, Stat stat) {

                            if (rc != Code.OK.intValue()) {
                                KeeperException e = ZkUtils.logErrorAndCreateZKException(
                                                        "Could not read subscription data for topic: " + topic.toStringUtf8()
                                                        + ", subscriberId: " + subscriberId.toStringUtf8(), path, rc);
                                reportFailure(new PubSubException.ServiceDownException(e));
                                return;
                            }

                            if (failed.get()) {
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

                            try {
                                state = SubscriptionState.parseFrom(data);
                            } catch (InvalidProtocolBufferException ex) {
                                String msg = "Failed to deserialize state for topic: " + topic.toStringUtf8()
                                             + " subscriberId: " + subscriberId.toStringUtf8();
                                logger.error(msg, ex);
                                reportFailure(new PubSubException.UnexpectedConditionException(msg));
                                return;
                            }
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

            CreateOrAttach createOrAttach = subRequest.getCreateOrAttach();

            if (subscriptionState != null) {

                if (createOrAttach.equals(CreateOrAttach.CREATE)) {
                    String msg = "Topic: " + topic.toStringUtf8() + " subscriberId: " + subscriberId.toStringUtf8()
                                 + " requested creating a subscription but it is already subscribed with state: "
                                 + SubscriptionStateUtils.toString(subscriptionState.getSubscriptionState());
                    logger.debug(msg);
                    cb.operationFailed(ctx, new PubSubException.ClientAlreadySubscribedException(msg));
                    return;
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

                    return;
                }

                // otherwise just attach
                if (logger.isDebugEnabled()) {
                    logger.debug("Topic: " + topic.toStringUtf8() + " subscriberId: " + subscriberId.toStringUtf8()
                                 + " attaching to subscription with state: "
                                 + SubscriptionStateUtils.toString(subscriptionState.getSubscriptionState()));
                }

                cb.operationFinished(ctx, subscriptionState.getLastConsumeSeqId());
View Full Code Here

Examples of com.google.protobuf.ByteString.toStringUtf8()

                return;
            }

            // we don't have a mapping for this subscriber
            if (createOrAttach.equals(CreateOrAttach.ATTACH)) {
                String msg = "Topic: " + topic.toStringUtf8() + " subscriberId: " + subscriberId.toStringUtf8()
                             + " requested attaching to an existing subscription but it is not subscribed";
                logger.debug(msg);
                cb.operationFailed(ctx, new PubSubException.ClientNotSubscribedException(msg));
                return;
            }
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.