Search in sources :

Example 1 with OctetStreamReader

use of org.ow2.proactive.scheduler.rest.readers.OctetStreamReader in project scheduling by ow2-proactive.

the class SchedulerClient method init.

@Override
public void init(ConnectionInfo connectionInfo) throws Exception {
    HttpClient client = new HttpClientBuilder().insecure(connectionInfo.isInsecure()).useSystemProperties().build();
    SchedulerRestClient restApiClient = new SchedulerRestClient(connectionInfo.getUrl(), new ApacheHttpClient4Engine(client));
    ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
    factory.register(new WildCardTypeReader());
    factory.register(new OctetStreamReader());
    factory.register(new TaskResultReader());
    setApiClient(restApiClient);
    this.connectionInfo = connectionInfo;
    this.initialized = true;
    renewSession();
}
Also used : WildCardTypeReader(org.ow2.proactive.scheduler.rest.readers.WildCardTypeReader) TaskResultReader(org.ow2.proactive.scheduler.rest.readers.TaskResultReader) OctetStreamReader(org.ow2.proactive.scheduler.rest.readers.OctetStreamReader) HttpClient(org.apache.http.client.HttpClient) CloseableHttpClient(org.apache.http.impl.client.CloseableHttpClient) ApacheHttpClient4Engine(org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine) HttpClientBuilder(org.ow2.proactive.http.HttpClientBuilder) SchedulerRestClient(org.ow2.proactive_grid_cloud_portal.scheduler.client.SchedulerRestClient) ResteasyProviderFactory(org.jboss.resteasy.spi.ResteasyProviderFactory)

Aggregations

HttpClient (org.apache.http.client.HttpClient)1 CloseableHttpClient (org.apache.http.impl.client.CloseableHttpClient)1 ApacheHttpClient4Engine (org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine)1 ResteasyProviderFactory (org.jboss.resteasy.spi.ResteasyProviderFactory)1 HttpClientBuilder (org.ow2.proactive.http.HttpClientBuilder)1 OctetStreamReader (org.ow2.proactive.scheduler.rest.readers.OctetStreamReader)1 TaskResultReader (org.ow2.proactive.scheduler.rest.readers.TaskResultReader)1 WildCardTypeReader (org.ow2.proactive.scheduler.rest.readers.WildCardTypeReader)1 SchedulerRestClient (org.ow2.proactive_grid_cloud_portal.scheduler.client.SchedulerRestClient)1