use of com.linkedin.entitystream.SingletonWriter in project rest.li by linkedin.
the class UnstructuredDataReactiveCollectionResource method get.
@Override
public void get(String key, @CallbackParam Callback<UnstructuredDataReactiveResult> callback) {
Writer<ByteString> writer = new SingletonWriter<>(ByteString.copy(UNSTRUCTURED_DATA_BYTES));
UnstructuredDataReactiveResult result = new UnstructuredDataReactiveResult(EntityStreams.newEntityStream(writer), MIME_TYPE);
callback.onSuccess(result);
}
use of com.linkedin.entitystream.SingletonWriter in project rest.li by linkedin.
the class GreetingUnstructuredDataAssociationResourceReactive method get.
@Override
public void get(CompoundKey key, @CallbackParam Callback<UnstructuredDataReactiveResult> callback) {
Writer<ByteString> writer = new SingletonWriter<>(ByteString.copy(UNSTRUCTURED_DATA_BYTES));
callback.onSuccess(new UnstructuredDataReactiveResult(EntityStreams.newEntityStream(writer), MIME_TYPE));
}
use of com.linkedin.entitystream.SingletonWriter in project rest.li by linkedin.
the class GreetingUnstructuredDataSimpleResourceReactive method get.
@Override
public void get(@CallbackParam Callback<UnstructuredDataReactiveResult> callback) {
Writer<ByteString> writer = new SingletonWriter<>(ByteString.copy(UNSTRUCTURED_DATA_BYTES));
callback.onSuccess(new UnstructuredDataReactiveResult(EntityStreams.newEntityStream(writer), MIME_TYPE));
}
Aggregations