org.jboss.resteasy.reactor.MonoRxInvokerImpl Maven / Gradle / Ivy
package org.jboss.resteasy.reactor;
import javax.ws.rs.client.CompletionStageRxInvoker;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import reactor.core.publisher.Mono;
@SuppressWarnings("unchecked")
public class MonoRxInvokerImpl implements MonoRxInvoker
{
private final CompletionStageRxInvoker completionStageRxInvoker;
private final MonoProvider monoProvider;
public MonoRxInvokerImpl(final CompletionStageRxInvoker completionStageRxInvoker)
{
this.completionStageRxInvoker = completionStageRxInvoker;
this.monoProvider = new MonoProvider();
}
@Override
public Mono get()
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.get());
}
@Override
public Mono get(Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.get(responseType));
}
@Override
public Mono get(GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.get(responseType));
}
@Override
public Mono put(Entity> entity)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.put(entity));
}
@Override
public Mono put(Entity> entity, Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.put(entity, responseType));
}
@Override
public Mono put(Entity> entity, GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.put(entity, responseType));
}
@Override
public Mono post(Entity> entity)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.post(entity));
}
@Override
public Mono post(Entity> entity, Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.post(entity, responseType));
}
@Override
public Mono post(Entity> entity, GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.post(entity, responseType));
}
@Override
public Mono delete()
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.delete());
}
@Override
public Mono delete(Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.delete(responseType));
}
@Override
public Mono delete(GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.delete(responseType));
}
@Override
public Mono head()
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.head());
}
@Override
public Mono options()
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.options());
}
@Override
public Mono options(Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.options(responseType));
}
@Override
public Mono options(GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.options(responseType));
}
@Override
public Mono trace()
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.trace());
}
@Override
public Mono trace(Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.trace(responseType));
}
@Override
public Mono trace(GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.trace(responseType));
}
@Override
public Mono method(String name)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name));
}
@Override
public Mono method(String name, Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name, responseType));
}
@Override
public Mono method(String name, GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name, responseType));
}
@Override
public Mono method(String name, Entity> entity)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name, entity));
}
@Override
public Mono method(String name, Entity> entity, Class responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name, entity, responseType));
}
@Override
public Mono method(String name, Entity> entity, GenericType responseType)
{
return (Mono) monoProvider.fromCompletionStage(() -> completionStageRxInvoker.method(name, entity, responseType));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy