Examples of SessionService


Examples of org.pentaho.platform.web.http.api.resources.services.SessionService

public class SessionResource extends AbstractJaxRSResource {

  private static SessionService sessionService;

  public SessionResource() {
    sessionService = new SessionService();
  }
View Full Code Here

Examples of org.serviceconnector.service.SessionService

    int simulation = this.getParameterInt(request, "sim", 0);
    if (simulation > 0) {
      Service[] sim = new Service[simulation + services.length];
      System.arraycopy(services, 0, sim, 0, services.length);
      for (int i = services.length; i < simulation + services.length; i++) {
        sim[i] = new SessionService("sim " + i);
      }
      services = sim;
    }
    Paging paging = this.writePagingAttributes(writer, request, services.length, "");
    // String showSessionsParameter = request.getParameter("showsessions");
View Full Code Here

Examples of org.serviceconnector.service.SessionService

    int simulation = this.getParameterInt(request, "sim", 0);
    if (simulation > 0) {
      Service[] sim = new Service[simulation + services.length];
      System.arraycopy(services, 0, sim, 0, services.length);
      for (int i = services.length; i < simulation + services.length; i++) {
        sim[i] = new SessionService("sim " + i);
      }
      services = sim;
    }
    Paging paging = this.writePagingAttributes(writer, request, services.length, "");
    // String showSessionsParameter = request.getParameter("showsessions");
View Full Code Here

Examples of org.teiid.dqp.service.SessionService


public class TestLogonImpl extends TestCase {

  public void testLogonResult() throws Exception {
    SessionService ssi = Mockito.mock(SessionService.class);
    DQPWorkContext.setWorkContext(new DQPWorkContext());
    String userName = "Fred"; //$NON-NLS-1$
    String applicationName = "test"; //$NON-NLS-1$
    Properties p = new Properties();
    p.setProperty(TeiidURL.CONNECTION.USER_NAME, userName);
    p.setProperty(TeiidURL.CONNECTION.APP_NAME, applicationName);

    SessionMetadata session = new SessionMetadata();
    session.setUserName(userName);
    session.setApplicationName(applicationName);
    session.setSessionId(String.valueOf(1));
    session.setSessionToken(new SessionToken(1, userName));

    Mockito.stub(ssi.createSession(userName, null, applicationName,p, false, true)).toReturn(session);

    LogonImpl impl = new LogonImpl(ssi, "fakeCluster"); //$NON-NLS-1$

    LogonResult result = impl.logon(p);
    assertEquals(userName, result.getUserName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.