This project has retired. For details please refer to its Attic page.
SessionUIResource (Lens 2.0.1-beta-incubating API)

org.apache.lens.server.ui
Class SessionUIResource

java.lang.Object
  extended by org.apache.lens.server.ui.SessionUIResource

@Path(value="/uisession")
public class SessionUIResource
extends Object

Session resource api

This provides api for all things in session.


Field Summary
static org.apache.commons.logging.Log LOG
          The Constant LOG.
static HashMap<UUID,LensSessionHandle> openSessions
          The open sessions.
 
Constructor Summary
SessionUIResource()
          Instantiates a new session ui resource.
 
Method Summary
 APIResult closeSession(UUID publicId)
          Close a Lens server session.
 String getMessage()
          API to know if session service is up and running
 LensSessionHandle openSession(String username, String password, LensConf sessionconf)
          Create a new session with Lens server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
The Constant LOG.


openSessions

public static HashMap<UUID,LensSessionHandle> openSessions
The open sessions.

Constructor Detail

SessionUIResource

public SessionUIResource()
                  throws LensException
Instantiates a new session ui resource.

Throws:
LensException - the lens exception
Method Detail

getMessage

@GET
@Produces(value="text/plain")
public String getMessage()
API to know if session service is up and running

Returns:
Simple text saying it up

openSession

@POST
@Consumes(value="multipart/form-data")
@Produces(value={"application/json","application/xml","text/plain"})
public LensSessionHandle openSession(String username,
                                                            String password,
                                                            LensConf sessionconf)
Create a new session with Lens server.

Parameters:
username - User name of the Lens server user
password - Password of the Lens server user
sessionconf - Key-value properties which will be used to configure this session
Returns:
A Session handle unique to this session

closeSession

@DELETE
@Path(value="{publicId}")
@Produces(value={"application/json","application/xml","text/plain"})
public APIResult closeSession(@PathParam(value="publicId")
                                                   UUID publicId)
Close a Lens server session.

Parameters:
publicId - Session's public id of the session to be closed
Returns:
APIResult object indicating if the operation was successful (check result.getStatus())


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.