public abstract class EventStreamRPCServiceModel extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE_APPLICATION_JSON |
static String |
CONTENT_TYPE_APPLICATION_TEXT |
static String |
CONTENT_TYPE_HEADER |
static String |
SERVICE_MODEL_TYPE_HEADER |
| Constructor and Description |
|---|
EventStreamRPCServiceModel() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
blobTypeEquals(Optional<byte[]> lhs,
Optional<byte[]> rhs)
Used to compare two members of a blob shape for equality.
|
<T extends EventStreamJsonMessage> |
fromJson(Class<T> clazz,
byte[] payload) |
EventStreamJsonMessage |
fromJson(String applicationModelType,
byte[] payload)
Uses this service's specific model class
|
abstract Collection<String> |
getAllOperations()
Retreives all operations on the service
|
Optional<Class<? extends EventStreamJsonMessage>> |
getApplicationModelClass(String applicationModelType) |
abstract OperationModelContext |
getOperationModelContext(String operationName)
Retrieves the operation model context for a given operation name on the service
This may not be a useful interface as generated code will typically pull a known operation model context
Public visibility is useful for testing
|
abstract String |
getServiceName()
For actual
|
static com.google.gson.Gson |
getStaticGson()
In situations where the framework needs to do some JSON processing
without a specific service/operation in context
|
byte[] |
toJson(EventStreamJsonMessage message) |
String |
toJsonString(EventStreamJsonMessage message) |
public static final String CONTENT_TYPE_HEADER
public static final String CONTENT_TYPE_APPLICATION_TEXT
public static final String CONTENT_TYPE_APPLICATION_JSON
public static final String SERVICE_MODEL_TYPE_HEADER
public static boolean blobTypeEquals(Optional<byte[]> lhs, Optional<byte[]> rhs)
lhs - rhs - public abstract String getServiceName()
public final Optional<Class<? extends EventStreamJsonMessage>> getApplicationModelClass(String applicationModelType)
public abstract Collection<String> getAllOperations()
public abstract OperationModelContext getOperationModelContext(String operationName)
operationName - public byte[] toJson(EventStreamJsonMessage message)
public String toJsonString(EventStreamJsonMessage message)
public static com.google.gson.Gson getStaticGson()
public EventStreamJsonMessage fromJson(String applicationModelType, byte[] payload)
applicationModelType - payload - public <T extends EventStreamJsonMessage> T fromJson(Class<T> clazz, byte[] payload)
Copyright ? 2021. All rights reserved.