use of org.apache.ignite.internal.binary.BinaryRawReaderEx in project ignite by apache.
the class PlatformTestPluginTarget method invokeCallback.
/**
* Invokes the platform callback.
*
* @param val Value to send.
* @return Result.
*/
private String invokeCallback(String val) {
PlatformMemory outMem = platformCtx.memory().allocate();
PlatformMemory inMem = platformCtx.memory().allocate();
PlatformOutputStream outStream = outMem.output();
BinaryRawWriterEx writer = platformCtx.writer(outStream);
writer.writeString(val);
outStream.synchronize();
platformCtx.gateway().pluginCallback(1, outMem, inMem);
BinaryRawReaderEx reader = platformCtx.reader(inMem);
return reader.readString();
}
Aggregations