Search in sources :

Example 6 with UnstructuredDataReactiveResult

use of com.linkedin.restli.server.UnstructuredDataReactiveResult 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));
}
Also used : ByteString(com.linkedin.data.ByteString) UnstructuredDataReactiveResult(com.linkedin.restli.server.UnstructuredDataReactiveResult) SingletonWriter(com.linkedin.entitystream.SingletonWriter)

Aggregations

UnstructuredDataReactiveResult (com.linkedin.restli.server.UnstructuredDataReactiveResult)6 ByteString (com.linkedin.data.ByteString)4 SingletonWriter (com.linkedin.entitystream.SingletonWriter)3 ChunkedByteStringWriter (com.linkedin.data.ChunkedByteStringWriter)1 RequestContext (com.linkedin.r2.message.RequestContext)1 EmptyRecord (com.linkedin.restli.common.EmptyRecord)1 RestLiServiceException (com.linkedin.restli.server.RestLiServiceException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1 NoPermissionException (javax.naming.NoPermissionException)1