Examples of encode()


Examples of org.fusesource.mqtt.codec.PUBLISH.encode()

                if (ack != null && sub.expectAck(publish)) {
                    synchronized (consumerAcks) {
                        consumerAcks.put(publish.messageId(), ack);
                    }
                }
                getMQTTTransport().sendToMQTT(publish.encode());
                if (ack != null && !sub.expectAck(publish)) {
                    getMQTTTransport().sendToActiveMQ(ack);
                }
            }
        } else if (command.getDataStructureType() == ConnectionError.DATA_STRUCTURE_TYPE) {

Examples of org.fusesource.mqtt.codec.PUBREC.encode()

                                PUBREC ack = new PUBREC();
                                ack.messageId(command.messageId());
                                synchronized (publisherRecs) {
                                    publisherRecs.put(command.messageId(), ack);
                                }
                                converter.getMQTTTransport().sendToMQTT(ack.encode());
                            }
                        }
                    };
                case AT_MOST_ONCE:
                    break;

Examples of org.fusesource.mqtt.codec.PUBREL.encode()

    void onMQTTPubRec(PUBREC commnand) {
        //from a subscriber - send a PUBREL in response
        PUBREL pubrel = new PUBREL();
        pubrel.messageId(commnand.messageId());
        sendToMQTT(pubrel.encode());
    }

    void onMQTTPubRel(PUBREL command) {
        PUBREC ack;
        synchronized (publisherRecs) {

Examples of org.fusesource.mqtt.codec.SUBACK.encode()

            }
            SUBACK ack = new SUBACK();
            ack.messageId(command.messageId());
            ack.grantedQos(qos);
            try {
                getMQTTTransport().sendToMQTT(ack.encode());
            } catch (IOException e) {
                LOG.warn("Couldn't send SUBACK for " + command, e);
            }
        } else {
            LOG.warn("No topics defined for Subscription " + command);

Examples of org.fusesource.mqtt.codec.SUBSCRIBE.encode()

        SUBSCRIBE subscribe = new SUBSCRIBE();
        subscribe.topics(new Topic[] {new Topic("TEST", QoS.EXACTLY_ONCE) });

        output = new DataByteArrayOutputStream();
        wireFormat.marshal(subscribe.encode(), output);
        marshalled = output.toBuffer();

        input = new DataByteArrayInputStream(marshalled);
        codec.parse(input, marshalled.length());

Examples of org.fusesource.mqtt.codec.UNSUBACK.encode()

                onUnSubscribe(topic);
            }
        }
        UNSUBACK ack = new UNSUBACK();
        ack.messageId(command.messageId());
        sendToMQTT(ack.encode());
    }

    void onUnSubscribe(UTF8Buffer topicName) {
        MQTTSubscription subs = mqttSubscriptionByTopic.remove(topicName);
        if (subs != null) {

Examples of org.fusesource.restygwt.examples.client.PizzaOrder.PizzaOrderJED.encode()

        pizza.toppings.add("ham");
        pizza.toppings.add("pineapple");
        order.pizzas.add(pizza);

        PizzaOrderJED jed = GWT.create(PizzaOrderJED.class);
        JSONValue value = jed.encode(order);
        return value;
    }
}

Examples of org.gatein.common.text.EntityEncoder.encode()

      public String getEncodedDescription()
      {
         if (getDescription() != null)
         {
            EntityEncoder encoder = EntityEncoder.FULL;
            return encoder.encode(getDescription());
         }
         else
         {
            return null;
         }

Examples of org.gatein.pc.controller.impl.ControllerRequestParameterMapFactory.encode()

   public String renderURL(String windowId, ContainerURL containerURL, URLFormat format)
   {
      ControllerRequestParameterMapFactory factory = new ControllerRequestParameterMapFactory(serialization);

      //
      Map<String, String> parameters = factory.encode(pageNS, windowId, containerURL);

      //
      parameters.put(TYPE, PORTLET_TYPE);

      //

Examples of org.geolatte.geom.codec.WkbEncoder.encode()

    }

    @Override
    public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
        WkbEncoder encoder = Wkb.newEncoder(Wkb.Dialect.POSTGIS_EWKB_1);
        ByteBuffer buffer = encoder.encode(value, byteOrder);
        int srid = value.getSRID();

        // prepend srid into first 4 bytes
        byte[] wkb = buffer.toByteArray();
        byte[] bytes = new byte[wkb.length + 4];
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.