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

org.apache.lens.server.api.session
Interface SessionService

All Known Implementing Classes:
HiveSessionService

public interface SessionService


Field Summary
static String NAME
          The Constant NAME.
 
Method Summary
 void addResource(LensSessionHandle sessionHandle, String type, String path)
          Adds the resource.
 int addResourceToAllServices(LensSessionHandle sessionHandle, String type, String path)
          Adds the resource to all services.
 void closeSession(LensSessionHandle sessionHandle)
          Close session.
 void deleteResource(LensSessionHandle sessionHandle, String type, String path)
          Delete resource.
 List<String> getAllSessionParameters(LensSessionHandle sessionHandle, boolean verbose, String key)
          Gets the all session parameters.
 List<String> listAllResources(LensSessionHandle sessionHandle, String type)
          Lists resources from the session service
 LensSessionHandle openSession(String username, String password, Map<String,String> configuration)
          Open session.
 void restoreSession(LensSessionHandle sessionHandle, String userName, String password)
          Restore session from previous instance of lens server.
 void setSessionParameter(LensSessionHandle sessionHandle, String key, String value)
          Sets the session parameter.
 

Field Detail

NAME

static final String NAME
The Constant NAME.

See Also:
Constant Field Values
Method Detail

openSession

LensSessionHandle openSession(String username,
                              String password,
                              Map<String,String> configuration)
                              throws LensException
Open session.

Parameters:
username - the username
password - the password
configuration - the configuration
Returns:
the lens session handle
Throws:
LensException - the lens exception

restoreSession

void restoreSession(LensSessionHandle sessionHandle,
                    String userName,
                    String password)
                    throws LensException
Restore session from previous instance of lens server.

Parameters:
sessionHandle - the session handle
userName - the user name
password - the password
Throws:
LensException - the lens exception

closeSession

void closeSession(LensSessionHandle sessionHandle)
                  throws LensException
Close session.

Parameters:
sessionHandle - the session handle
Throws:
LensException - the lens exception

addResource

void addResource(LensSessionHandle sessionHandle,
                 String type,
                 String path)
Adds the resource.

Parameters:
sessionHandle - the session handle
type - the type
path - the path
Throws:
LensException - the lens exception

deleteResource

void deleteResource(LensSessionHandle sessionHandle,
                    String type,
                    String path)
Delete resource.

Parameters:
sessionHandle - the session handle
type - the type
path - the path
Throws:
LensException - the lens exception

getAllSessionParameters

List<String> getAllSessionParameters(LensSessionHandle sessionHandle,
                                     boolean verbose,
                                     String key)
                                     throws LensException
Gets the all session parameters.

Parameters:
sessionHandle - the sessionid
verbose - the verbose
key - the key
Returns:
the all session parameters
Throws:
LensException - the lens exception

setSessionParameter

void setSessionParameter(LensSessionHandle sessionHandle,
                         String key,
                         String value)
Sets the session parameter.

Parameters:
sessionHandle - the sessionid
key - the key
value - the value

addResourceToAllServices

int addResourceToAllServices(LensSessionHandle sessionHandle,
                             String type,
                             String path)
Adds the resource to all services.

Parameters:
sessionHandle - the sessionid
type - the type
path - the path
Returns:
the number of services that the resource has been added to

listAllResources

List<String> listAllResources(LensSessionHandle sessionHandle,
                              String type)
Lists resources from the session service

Parameters:
sessionHandle - the sessionid
type - the resource type, can be null, file or jar
Returns:
Lists resources for a given resource type. Lists all resources if resource type is null


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