Class BaseSvensonJSONContext<T extends org.cometd.bayeux.Message.Mutable>
- java.lang.Object
-
- com.cumulocity.sdk.client.notification.BaseSvensonJSONContext<T>
-
- Direct Known Subclasses:
ClientSvensonJSONContext
public abstract class BaseSvensonJSONContext<T extends org.cometd.bayeux.Message.Mutable> extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseSvensonJSONContext(org.svenson.JSON jsonGenerator, org.svenson.JSONParser jsonParser)
BaseSvensonJSONContext(org.svenson.JSON jsonGenerator, org.svenson.JSONParser jsonParser, Class<?> dataType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected T[]
asArrayOfMessages(Collection<Map<String,Object>> collection)
String
generate(List<T> messages)
String
generate(T message)
org.cometd.common.JSONContext.Generator
getGenerator()
org.cometd.common.JSONContext.Parser
getParser()
T[]
parse(InputStream stream)
T[]
parse(Reader reader)
T[]
parse(String json)
protected abstract Class
targetClass()
protected abstract T
toMessage(Map<String,Object> messageProperties)
-
-
-
Constructor Detail
-
BaseSvensonJSONContext
public BaseSvensonJSONContext(org.svenson.JSON jsonGenerator, org.svenson.JSONParser jsonParser)
-
BaseSvensonJSONContext
public BaseSvensonJSONContext(org.svenson.JSON jsonGenerator, org.svenson.JSONParser jsonParser, Class<?> dataType)
-
-
Method Detail
-
parse
public T[] parse(Reader reader) throws ParseException
- Throws:
ParseException
-
parse
public T[] parse(String json) throws ParseException
- Throws:
ParseException
-
parse
public T[] parse(InputStream stream) throws ParseException
- Throws:
ParseException
-
asArrayOfMessages
protected T[] asArrayOfMessages(Collection<Map<String,Object>> collection)
-
targetClass
protected abstract Class targetClass()
-
getGenerator
public org.cometd.common.JSONContext.Generator getGenerator()
-
getParser
public org.cometd.common.JSONContext.Parser getParser()
-
-