Examples of ByteString


Examples of akka.util.ByteString

        final Connected c2 = expectMsgClass(Connected.class);
        assert c1.localAddress().equals(c2.remoteAddress());
        assert c2.localAddress().equals(c1.remoteAddress());
       
        client.tell(ByteString.fromString("hello"), getRef());
        final ByteString reply = expectMsgClass(ByteString.class);
        assert reply.utf8String().equals("hello");
       
        watch(client);
        client.tell("close", getRef());
        expectTerminated(client);
      }
View Full Code Here

Examples of co.nstant.in.cbor.model.ByteString

        add(convert(bytes));
        return this;
    }

    public ByteStringBuilder<CborBuilder> startByteString() {
        ByteString byteString = new ByteString(null);
        byteString.setChunked(true);
        add(byteString);
        return new ByteStringBuilder<CborBuilder>(this);
    }
View Full Code Here

Examples of com.dyuproject.protostuff.me.ByteString

        if(message.someBytes != null)
        {
            for(int i = 0; i < message.someBytes.size(); i++)
            {
                ByteString someBytes = (ByteString)message.someBytes.elementAt(i);
                if(someBytes != null)
                    output.writeBytes(5, someBytes, true);
            }
        }
View Full Code Here

Examples of com.google.appengine.repackaged.com.google.protobuf.ByteString

            if (SET_METHOD.equals(method)) {
                try {
                    MemcacheSetRequest.Builder builder =
                        MemcacheSetRequest.newBuilder().mergeFrom(requestBuf);
                    for (MemcacheSetRequest.Item item : builder.getItemList()) {
                        ByteString key = item.getKey();
                        memcacheKeys.add(key);
                    }
                } catch (Exception e) {
                    ThrowableUtil.wrapAndThrow(e);
                }
            } else if (INCREMENT_METHOD.equals(method)) {
                try {
                    MemcacheIncrementRequest.Builder builder =
                        MemcacheIncrementRequest.newBuilder().mergeFrom(
                            requestBuf);
                    ByteString key = builder.getKey();
                    memcacheKeys.add(key);
                } catch (Exception e) {
                    ThrowableUtil.wrapAndThrow(e);
                }
            } else if (BATCH_INCREMENT_METHOD.equals(method)) {
                try {
                    MemcacheBatchIncrementRequest.Builder builder =
                        MemcacheBatchIncrementRequest.newBuilder().mergeFrom(
                            requestBuf);
                    for (MemcacheIncrementRequest item : builder.getItemList()) {
                        ByteString key = item.getKey();
                        memcacheKeys.add(key);
                    }
                } catch (Exception e) {
                    ThrowableUtil.wrapAndThrow(e);
                }
View Full Code Here

Examples of com.google.protobuf.ByteString

        Array data = Array.factory(dt, new int[] {lenp});
        for (int i=0; i<lenp; i++) data.setObject(i, attp.getSdata(i));
        return new Attribute(attp.getName(), data);
      }
    } else {
      ByteString bs = attp.getData();
      ByteBuffer bb = ByteBuffer.wrap(bs.toByteArray());
      return new Attribute(attp.getName(), Array.factory(decodeAttributeType(attp.getType()), null, bb));
    }
  }
View Full Code Here

Examples of com.google.protobuf.ByteString

    @Override
    public Catcher.LogMessageResponse log(RpcController controller, Catcher.LogMessage request) throws ServiceException {
        try {
            String topic = request.getTopic();
            ByteString payload = request.getPayload();
            logger.write(topic, payload);
            recorder.message(topic);
            return Catcher.LogMessageResponse.newBuilder()
                    .setServerId(serverId)
                    .setSuccessful(true)
View Full Code Here

Examples of com.google.protobuf.ByteString

    @Override
    public Catcher.LogMessageResponse log(RpcController controller,
            Catcher.LogMessage request) throws ServiceException {

        String topic = request.getTopic();
        ByteString payload = request.getPayload();

        Catcher.LogMessageResponse.Builder r = Catcher.LogMessageResponse
                .newBuilder().setServerId(serverId).setSuccessful(true);

        ClusterState.Target directTo = state.directTo(topic);
View Full Code Here

Examples of com.google.protobuf.ByteString

         *
         * @return computed result
         */
        @Override
        public LogResponse call() throws IOException {
            ByteString payload = getProto().getPayload();
            String topic = getProto().getTopic();
            logger.write(topic, payload);
            return new LogResponse(
                    Catcher.LogMessageResponse.newBuilder()
                            .setServerId(serverId)
View Full Code Here

Examples of com.google.protobuf.ByteString

    @Override
    public Object[] getGroup() {
       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

    @Override
    public Object[] getGroup() {
       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
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.