Search in sources :

Example 1 with DataSpaceClient

use of org.ow2.proactive.scheduler.rest.ds.DataSpaceClient in project scheduling by ow2-proactive.

the class RestSmartProxyImpl method init.

@Override
public void init(ConnectionInfo connectionInfo) {
    try {
        this.connectionInfo = connectionInfo;
        this.restSchedulerClient = SchedulerClient.createInstance();
        this.restSchedulerClient.init(new ConnectionInfo(connectionInfo.getUrl(), connectionInfo.getLogin(), connectionInfo.getPassword(), connectionInfo.getCredentialFile(), connectionInfo.isInsecure()));
        DataSpaceClient restDsClient = new DataSpaceClient();
        restDsClient.init(connectionInfo.getUrl(), this.restSchedulerClient);
        this.restDataSpaceClient = restDsClient;
        super.jobTracker.setRestDataSpaceClient(this.restDataSpaceClient);
        this.jobTracker.loadJobs();
        setInitialized(true);
        registerAsListener();
        syncAwaitedJobs();
    } catch (Exception e) {
        Throwables.propagate(e);
    }
}
Also used : IDataSpaceClient(org.ow2.proactive.scheduler.rest.ds.IDataSpaceClient) DataSpaceClient(org.ow2.proactive.scheduler.rest.ds.DataSpaceClient) ConnectionInfo(org.ow2.proactive.authentication.ConnectionInfo) TimeoutException(java.util.concurrent.TimeoutException) UnknownJobException(org.ow2.proactive.scheduler.common.exception.UnknownJobException) SubmissionClosedException(org.ow2.proactive.scheduler.common.exception.SubmissionClosedException) JobCreationException(org.ow2.proactive.scheduler.common.exception.JobCreationException) PermissionException(org.ow2.proactive.scheduler.common.exception.PermissionException) NotConnectedException(org.ow2.proactive.scheduler.common.exception.NotConnectedException) UnknownTaskException(org.ow2.proactive.scheduler.common.exception.UnknownTaskException)

Example 2 with DataSpaceClient

use of org.ow2.proactive.scheduler.rest.ds.DataSpaceClient in project scheduling by ow2-proactive.

the class DataTransferTest method clientInstance.

private IDataSpaceClient clientInstance() throws Exception {
    DataSpaceClient client = new DataSpaceClient();
    client.init(new ConnectionInfo(getRestServerUrl(), getLogin(), getPassword(), null, true));
    return client;
}
Also used : ConnectionInfo(org.ow2.proactive.authentication.ConnectionInfo)

Aggregations

ConnectionInfo (org.ow2.proactive.authentication.ConnectionInfo)2 TimeoutException (java.util.concurrent.TimeoutException)1 JobCreationException (org.ow2.proactive.scheduler.common.exception.JobCreationException)1 NotConnectedException (org.ow2.proactive.scheduler.common.exception.NotConnectedException)1 PermissionException (org.ow2.proactive.scheduler.common.exception.PermissionException)1 SubmissionClosedException (org.ow2.proactive.scheduler.common.exception.SubmissionClosedException)1 UnknownJobException (org.ow2.proactive.scheduler.common.exception.UnknownJobException)1 UnknownTaskException (org.ow2.proactive.scheduler.common.exception.UnknownTaskException)1 DataSpaceClient (org.ow2.proactive.scheduler.rest.ds.DataSpaceClient)1 IDataSpaceClient (org.ow2.proactive.scheduler.rest.ds.IDataSpaceClient)1