javax.ws.rs.client.SyncInvoker Java Examples

The following examples show how to use javax.ws.rs.client.SyncInvoker. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PromiseRxInvokerProviderImpl.java    From aries-jax-rs-whiteboard with Apache License 2.0 6 votes vote down vote up
@Override
public PromiseRxInvoker getRxInvoker(
    SyncInvoker syncInvoker, ExecutorService executorService) {

    PromiseFactory promiseFactory;

    if (executorService != null) {
        promiseFactory = new PromiseFactory(executorService);
    }
    else {
        promiseFactory = new PromiseFactory(
            PromiseFactory.inlineExecutor());
    }

    return new PromiseRxInvokerImpl(((SyncInvokerImpl) syncInvoker).getWebClient(), promiseFactory);
}
 
Example #2
Source File: ObservableRxInvokerProvider.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Override
public ObservableRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    // TODO: At the moment we still delegate if possible to the async HTTP conduit.
    // Investigate if letting the RxJava thread pool deal with the sync invocation
    // is indeed more effective
    return new ObservableRxInvokerImpl(((SyncInvokerImpl)syncInvoker).getWebClient(), executorService);
}
 
Example #3
Source File: MultiRxInvokerImpl.java    From quarkus with Apache License 2.0 5 votes vote down vote up
public MultiRxInvokerImpl(final SyncInvoker syncInvoker, final ExecutorService executorService) {
    if (!(syncInvoker instanceof ClientInvocationBuilder)) {
        throw new ProcessingException("Expected a ClientInvocationBuilder");
    }
    this.syncInvoker = (ClientInvocationBuilder) syncInvoker;
    if (executorService instanceof ScheduledExecutorService) {
        this.executorService = (ScheduledExecutorService) executorService;
    }
}
 
Example #4
Source File: UniInvokerProvider.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Override
public UniRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    if (syncInvoker instanceof ClientInvocationBuilder) {
        ClientInvocationBuilder builder = (ClientInvocationBuilder) syncInvoker;
        CompletionStageRxInvoker completionStageRxInvoker = builder.rx();
        return new UniRxInvokerImpl(completionStageRxInvoker);
    } else {
        throw new ProcessingException("Expected a ClientInvocationBuilder");
    }
}
 
Example #5
Source File: WebClient.java    From cxf with Apache License 2.0 4 votes vote down vote up
public SyncInvoker sync() {
    return new SyncInvokerImpl(this);
}
 
Example #6
Source File: ReactorInvokerProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
public ReactorInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new ReactorInvokerImpl(((SyncInvokerImpl)syncInvoker).getWebClient(), executorService);
}
 
Example #7
Source File: ObservableRxInvokerImpl.java    From cxf with Apache License 2.0 4 votes vote down vote up
public ObservableRxInvokerImpl(SyncInvoker syncInvoker, ExecutorService ex) {
    this.syncInvoker = syncInvoker;
    this.sc = ex == null ? null : Schedulers.from(ex);
}
 
Example #8
Source File: ObservableRxInvokerProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
public ObservableRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new ObservableRxInvokerImpl(syncInvoker, executorService);
}
 
Example #9
Source File: FlowableRxInvokerImpl.java    From cxf with Apache License 2.0 4 votes vote down vote up
public FlowableRxInvokerImpl(SyncInvoker syncInvoker, ExecutorService ex) {
    this.syncInvoker = syncInvoker;
    this.sc = ex == null ? null : Schedulers.from(ex);
}
 
Example #10
Source File: FlowableRxInvokerProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
public FlowableRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new FlowableRxInvokerImpl(syncInvoker, executorService);
}
 
Example #11
Source File: ObservableRxInvokerImpl.java    From cxf with Apache License 2.0 4 votes vote down vote up
public ObservableRxInvokerImpl(SyncInvoker syncInvoker, ExecutorService ex) {
    this.syncInvoker = syncInvoker;
    this.sc = ex == null ? null : Schedulers.from(ex);
}
 
Example #12
Source File: ObservableRxInvokerProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
public ObservableRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new ObservableRxInvokerImpl(syncInvoker, executorService);
}
 
Example #13
Source File: FlowableRxInvokerImpl.java    From cxf with Apache License 2.0 4 votes vote down vote up
public FlowableRxInvokerImpl(SyncInvoker syncInvoker, ExecutorService ex) {
    this.syncInvoker = syncInvoker;
    this.sc = ex == null ? null : Schedulers.from(ex);
}
 
Example #14
Source File: FlowableRxInvokerProvider.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
public FlowableRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new FlowableRxInvokerImpl(syncInvoker, executorService);
}
 
Example #15
Source File: HttpMethods.java    From pandaria with MIT License 4 votes vote down vote up
static Method get() {
    return context -> in(context).request(SyncInvoker::get);
}
 
Example #16
Source File: ResourceTest.java    From alchemy with MIT License 4 votes vote down vote up
protected ResourceAssertionBuilder post(String url, String ... pathParams) {
    return new ResourceAssertionBuilder(SyncInvoker::post, resource(url, pathParams));
}
 
Example #17
Source File: ResourceTest.java    From alchemy with MIT License 4 votes vote down vote up
protected ResourceAssertionBuilder put(String url, String... pathParams) {
    return new ResourceAssertionBuilder(SyncInvoker::put, resource(url, pathParams));
}
 
Example #18
Source File: MultiInvokerProvider.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public MultiRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
    return new MultiRxInvokerImpl(syncInvoker, executorService);
}
 
Example #19
Source File: HttpMethods.java    From pandaria with MIT License 4 votes vote down vote up
static Method trace() {
    return context -> in(context).request(SyncInvoker::trace);
}
 
Example #20
Source File: HttpMethods.java    From pandaria with MIT License 4 votes vote down vote up
static Method options() {
    return context -> in(context).request(SyncInvoker::options);
}
 
Example #21
Source File: HttpMethods.java    From pandaria with MIT License 4 votes vote down vote up
static Method head() {
    return context -> in(context).request(SyncInvoker::head);
}
 
Example #22
Source File: HttpMethods.java    From pandaria with MIT License 4 votes vote down vote up
static Method delete() {
    return context -> in(context).request(SyncInvoker::delete);
}