Search in sources :

Example 6 with SchedulerProxyUserInterface

use of org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface in project scheduling by ow2-proactive.

the class SharedSessionStoreTestUtils method createValidSession.

public static String createValidSession(SchedulerProxyUserInterface scheduler) throws LoginException, ActiveObjectCreationException, SchedulerException, NodeException {
    SchedulerRMProxyFactory schedulerFactory = mock(SchedulerRMProxyFactory.class);
    when(schedulerFactory.connectToScheduler(Matchers.<CredData>any())).thenReturn(scheduler);
    SharedSessionStore.getInstance().setSchedulerRMProxyFactory(schedulerFactory);
    // login
    Session session = SharedSessionStore.getInstance().createUnnamedSession();
    session.connectToScheduler(new CredData());
    return session.getSessionId();
}
Also used : CredData(org.ow2.proactive.authentication.crypto.CredData)

Example 7 with SchedulerProxyUserInterface

use of org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface in project scheduling by ow2-proactive.

the class SchedulerRMProxyFactory method connectToScheduler.

public SchedulerProxyUserInterface connectToScheduler(CredData credData) throws ActiveObjectCreationException, NodeException, LoginException, SchedulerException {
    SchedulerProxyUserInterface scheduler = PAActiveObject.newActive(SchedulerProxyUserInterface.class, new Object[] {});
    scheduler.init(PortalConfiguration.SCHEDULER_URL.getValueAsString(), credData);
    return scheduler;
}
Also used : SchedulerProxyUserInterface(org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface)

Example 8 with SchedulerProxyUserInterface

use of org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface in project scheduling by ow2-proactive.

the class SchedulerRMProxyFactory method connectToScheduler.

public SchedulerProxyUserInterface connectToScheduler(Credentials credentials) throws LoginException, SchedulerException, ActiveObjectCreationException, NodeException {
    SchedulerProxyUserInterface scheduler = PAActiveObject.newActive(SchedulerProxyUserInterface.class, new Object[] {});
    scheduler.init(PortalConfiguration.SCHEDULER_URL.getValueAsString(), credentials);
    return scheduler;
}
Also used : SchedulerProxyUserInterface(org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface)

Aggregations

SchedulerProxyUserInterface (org.ow2.proactive.scheduler.common.util.SchedulerProxyUserInterface)7 NotConnectedException (org.ow2.proactive.scheduler.common.exception.NotConnectedException)3 PermissionException (org.ow2.proactive.scheduler.common.exception.PermissionException)3 NotConnectedRestException (org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException)3 HttpSession (javax.servlet.http.HttpSession)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 UnknownJobException (org.ow2.proactive.scheduler.common.exception.UnknownJobException)2 UnknownTaskException (org.ow2.proactive.scheduler.common.exception.UnknownTaskException)2 Session (org.ow2.proactive_grid_cloud_portal.common.Session)2 PermissionRestException (org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException)2 IOException (java.io.IOException)1 URISyntaxException (java.net.URISyntaxException)1 KeyException (java.security.KeyException)1 HashMap (java.util.HashMap)1 LoginException (javax.security.auth.login.LoginException)1 GET (javax.ws.rs.GET)1 POST (javax.ws.rs.POST)1 FileObject (org.apache.commons.vfs2.FileObject)1 AtmosphereResource (org.atmosphere.cpr.AtmosphereResource)1