use of org.ow2.proactive.utils.console.MBeanInfoViewer in project scheduling by ow2-proactive.
the class SchedulerProxyUserInterface method init.
/**
* initialize the connection the scheduler.
* Must be called only once.
* Create the corresponding credential object before sending it
* to the scheduler.
* @param url the scheduler's url
* @param credData the credential object that contains user-related data
* @throws SchedulerException thrown if the scheduler is not available
* @throws LoginException if the couple username/password is invalid
* @since Scheduling 3.1.0
*/
public void init(String url, CredData credData) throws SchedulerException, LoginException {
SchedulerAuthenticationInterface auth = SchedulerConnection.join(url);
PublicKey pubKey = auth.getPublicKey();
try {
Credentials cred = Credentials.createCredentials(credData, pubKey);
this.uischeduler = auth.login(cred);
mbeaninfoviewer = new MBeanInfoViewer(auth, credData.getLogin(), cred);
} catch (KeyException e) {
throw new InternalSchedulerException(e);
}
}
use of org.ow2.proactive.utils.console.MBeanInfoViewer in project scheduling by ow2-proactive.
the class SchedulerProxyUserInterface method init.
/**
* initialize the connection the scheduler.
* Must be called only once
* @param url the scheduler's url
* @param credentials the credential to be passed to the scheduler
* @throws SchedulerException thrown if the scheduler is not available
* @throws LoginException thrown if the credential is invalid
*/
public void init(String url, Credentials credentials) throws SchedulerException, LoginException {
SchedulerAuthenticationInterface auth = SchedulerConnection.join(url);
this.uischeduler = auth.login(credentials);
mbeaninfoviewer = new MBeanInfoViewer(auth, null, credentials);
}
Aggregations