Package cz.o2.proxima.io.pubsub.util
Class PubSubUtils
- java.lang.Object
-
- cz.o2.proxima.io.pubsub.util.PubSubUtils
-
public class PubSubUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static cz.o2.proxima.io.pubsub.proto.PubSub.KeyValue
toKeyValue(StreamElement element)
CreatePubSub.KeyValue
fromStreamElement
.static java.util.Optional<StreamElement>
toStreamElement(EntityDescriptor entity, java.lang.String uuid, byte[] payload)
Convert pubsub payload intoStreamElement
.static java.util.Optional<StreamElement>
toStreamElement(EntityDescriptor entity, java.lang.String uuid, cz.o2.proxima.io.pubsub.proto.PubSub.KeyValue kv)
Convert pubsub payload intoStreamElement
.
-
-
-
Method Detail
-
toStreamElement
public static java.util.Optional<StreamElement> toStreamElement(EntityDescriptor entity, java.lang.String uuid, byte[] payload)
Convert pubsub payload intoStreamElement
.- Parameters:
entity
- Entity descriptoruuid
- message uuidpayload
- 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 intoStreamElement
.- Parameters:
entity
- Entity descriptoruuid
- message uuidkv
- theKeyValue
- Returns:
- StreamElement
-
toKeyValue
public static cz.o2.proxima.io.pubsub.proto.PubSub.KeyValue toKeyValue(StreamElement element)
CreatePubSub.KeyValue
fromStreamElement
.- Parameters:
element
- the StreamElement- Returns:
PubSub.KeyValue
-
-