use of org.ow2.proactive_grid_cloud_portal.rm.client.RMRestClient in project scheduling by ow2-proactive.
the class RMNodeClient method init.
@Override
public void init(ConnectionInfo connectionInfo) throws Exception {
HttpClient client = new HttpClientBuilder().insecure(connectionInfo.isInsecure()).useSystemProperties().build();
RMRestClient restApiClient = new RMRestClient(connectionInfo.getUrl(), new ApacheHttpClient4Engine(client));
this.rm = restApiClient.getRm();
this.connectionInfo = connectionInfo;
try {
String sid = rm.rmConnect(connectionInfo.getLogin(), connectionInfo.getPassword());
setSession(sid);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of org.ow2.proactive_grid_cloud_portal.rm.client.RMRestClient in project scheduling by ow2-proactive.
the class RMClientExample method main.
public static void main(String[] args) throws LoginException, KeyException, RMException {
System.out.println("Hello from example.");
RMRestClient client = new RMRestClient("http://localhost:8080/rest/", null);
RMRestInterface rm = client.getRm();
String sessionId = rm.rmConnect("admin", "admin");
System.out.println(sessionId);
}
Aggregations