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.
 
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
static LensSessionHandle getOpenSession(UUID id)
          get open session from uuid
 LensSessionHandle openSession(String username, String password, String database, 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.

Constructor Detail

SessionUIResource

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

Throws:
LensException - the lens exception
Method Detail

getOpenSession

public static LensSessionHandle getOpenSession(UUID id)
get open session from uuid

Parameters:
id -
Returns:

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,
                                                            @DefaultValue(value="")
                                                            String database,
                                                            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
database - (Optional) Set current database to supplied value
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.