|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.session.SessionService
public class SessionService
The Session Manager manages user sessions on the server side. It is a persistent Session Manager. It allows to save attributes in the session and retrieve them. This Session Manager is especially useful for Mobile/Device Apps which want to do session management.
Session
Constructor Summary | |
---|---|
SessionService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
This is a constructor that takes |
Method Summary | |
---|---|
Session |
getAllAttributes(java.lang.String sessionId)
Gets all the attributes for a given session id |
Session |
getAttribute(java.lang.String sessionId,
java.lang.String attributeName)
Gets the attribute value in a session whose session id is provided. |
Session |
getSession(java.lang.String uName)
Create Session for the User. |
Session |
getSession(java.lang.String uName,
boolean isCreate)
Create User Session based on the isCreate boolean parameter. |
App42Response |
invalidate(java.lang.String sessionId)
Invalidate a session based on the session id. |
App42Response |
removeAllAttributes(java.lang.String sessionId)
Removes all the attributes for a given session id |
App42Response |
removeAttribute(java.lang.String sessionId,
java.lang.String attributeName)
Removes the attribute from a session whose session id is provided. |
Session |
setAttribute(java.lang.String sessionId,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets attribute in a session whose session id is provided. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public Session getAllAttributes(java.lang.String sessionId) throws App42Exception
sessionId
- - The session id for which the attribute has to be fetched
App42Exception
public Session getAttribute(java.lang.String sessionId, java.lang.String attributeName) throws App42Exception
sessionId
- - The session id for which the attribute has to be fetchedattributeName
- - The attribute key that has to be fetched
App42Exception
public Session getSession(java.lang.String uName) throws App42Exception
uName
- - UserName for which the session has to be created.
App42Exception
public Session getSession(java.lang.String uName, boolean isCreate) throws App42Exception
uName
- - UserName for which the session has to be created.isCreate
- - A boolean value for specifying if an existing session is not
there, should a new one is to be created or not.
App42Exception
public App42Response invalidate(java.lang.String sessionId) throws App42Exception
sessionId
- - The session id for which the session has to be invalidated.
App42Exception
public App42Response removeAllAttributes(java.lang.String sessionId) throws App42Exception
sessionId
- - The session id for which the attributes has to be removed
App42Exception
public App42Response removeAttribute(java.lang.String sessionId, java.lang.String attributeName) throws App42Exception
sessionId
- - The session id for which the attribute has to be removedattributeName
- - The attribute key that has to be removed
App42Exception
public Session setAttribute(java.lang.String sessionId, java.lang.String attributeName, java.lang.String attributeValue) throws App42Exception
sessionId
- - Session id for which the attribute has to be saved.attributeName
- - The attribute key that needs to be storedattributeValue
- - The attribute value that needs to be stored
App42Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |