Class PubSubUtils


  • public class PubSubUtils
    extends java.lang.Object
    • Method Detail

      • toStreamElement

        public static java.util.Optional<StreamElement> toStreamElement​(EntityDescriptor entity,
                                                                        java.lang.String uuid,
                                                                        byte[] payload)
        Convert pubsub payload into StreamElement.
        Parameters:
        entity - Entity descriptor
        uuid - message uuid
        payload - paylod to parse
        Returns:
        StreamElement
      • toStreamElement

        public static java.util.Optional<StreamElement> toStreamElement​(EntityDescriptor entity,
                                                                        java.lang.String uuid,
                                                                        cz.o2.proxima.io.pubsub.proto.PubSub.KeyValue kv)
        Convert pubsub payload into StreamElement.
        Parameters:
        entity - Entity descriptor
        uuid - message uuid
        kv - the KeyValue
        Returns:
        StreamElement
      • toKeyValue

        public static cz.o2.proxima.io.pubsub.proto.PubSub.KeyValue toKeyValue​(StreamElement element)
        Create PubSub.KeyValue from StreamElement.
        Parameters:
        element - the StreamElement
        Returns:
        PubSub.KeyValue