Search in sources :

Example 6 with ReactiveReply

use of com.dexels.navajo.client.stream.ReactiveReply in project navajo by Dexels.

the class BinaryStoreAdapter method deleteBinary.

public ReactiveReply deleteBinary(String hexDigest, String resource, String bucket, boolean force) throws IOException {
    String tenant = access.getTenant();
    ReactiveReply result = HttpResourceFactory.getInstance().getHttpResource(resource).delete(tenant, bucket, hexDigest).blockingGet();
    logger.info("Deleted binary with status: {}", result.status());
    return result;
}
Also used : ReactiveReply(com.dexels.navajo.client.stream.ReactiveReply)

Example 7 with ReactiveReply

use of com.dexels.navajo.client.stream.ReactiveReply in project navajo by Dexels.

the class TestHttpResource method testDelete.

@Test
@Ignore
public void testDelete() throws IOException, MappableException, UserException {
    BinaryStoreAdapter bsa = new BinaryStoreAdapter();
    bsa.load(access);
    Binary b = createBinary();
    b.setMimeType("text/plain");
    ReactiveReply reply = bsa.deleteBinary(b.getHexDigest(), "binstore", "junit", false);
    Assert.assertNotSame(200, reply.status());
}
Also used : ReactiveReply(com.dexels.navajo.client.stream.ReactiveReply) Binary(com.dexels.navajo.document.types.Binary) BinaryStoreAdapter(com.dexels.navajo.resource.http.adapter.BinaryStoreAdapter) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ReactiveReply (com.dexels.navajo.client.stream.ReactiveReply)7 Binary (com.dexels.navajo.document.types.Binary)2 BinaryStoreAdapter (com.dexels.navajo.resource.http.adapter.BinaryStoreAdapter)2 Ignore (org.junit.Ignore)2 Test (org.junit.Test)2 Emitter (io.reactivex.Emitter)1 Flowable (io.reactivex.Flowable)1 FlowableTransformer (io.reactivex.FlowableTransformer)1 Single (io.reactivex.Single)1 IOException (java.io.IOException)1 ByteBuffer (java.nio.ByteBuffer)1 Optional (java.util.Optional)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 UnaryOperator (java.util.function.UnaryOperator)1 HttpClient (org.eclipse.jetty.client.HttpClient)1 Request (org.eclipse.jetty.client.api.Request)1 ContentChunk (org.eclipse.jetty.reactive.client.ContentChunk)1 ReactiveRequest (org.eclipse.jetty.reactive.client.ReactiveRequest)1 SslContextFactory (org.eclipse.jetty.util.ssl.SslContextFactory)1 Publisher (org.reactivestreams.Publisher)1