public interface Session
Session
represents the session interface.
Need to have a protocol specific sessions
Modifier and Type | Method and Description |
---|---|
void |
generateSessionHeader(org.wso2.transport.http.netty.message.HTTPCarbonMessage message,
boolean isSecureRequest)
Add header to response message.
|
String[] |
getAttributeNames()
Get attribute name list.
|
BMap<String,BValue> |
getAttributes()
Get attribute key value map.
|
BValue |
getAttributeValue(String attributeKey)
Retrieve a session attribute value.
|
Long |
getCreationTime()
Get session creation time.
|
String |
getId()
Retrieve a session id.
|
Long |
getLastAccessedTime()
Get last accessed time.
|
int |
getMaxInactiveInterval()
Get max inactive time duration.
|
String |
getPath()
Get path of session.
|
void |
invalidate()
Invalidate a session.
|
boolean |
isNew()
Get session status.
|
boolean |
isValid()
check validity.
|
void |
removeAttribute(String name)
Remove attribute from session.
|
Session |
setAccessed()
Update lastaccesed time and return Session.
|
void |
setAttribute(String attributeKey,
BValue attributeValue)
Add attribute key and value to session attribute map.
|
void |
setMaxInactiveInterval(int maxInactiveInterval)
Set max inactive time duration.
|
Session |
setNew(boolean isNew)
Update session stage whether new or already used.
|
BValue getAttributeValue(String attributeKey)
attributeKey
- key of the session attributeString getId()
void setAttribute(String attributeKey, BValue attributeValue)
attributeKey
- key of the session attributeattributeValue
- value of the session attributevoid invalidate()
Session setAccessed()
Long getLastAccessedTime()
Long getCreationTime()
String[] getAttributeNames()
BMap<String,BValue> getAttributes()
void removeAttribute(String name)
name
- which needs to deleteint getMaxInactiveInterval()
void setMaxInactiveInterval(int maxInactiveInterval)
maxInactiveInterval
- is the session max inactive time in secondsboolean isValid()
void generateSessionHeader(org.wso2.transport.http.netty.message.HTTPCarbonMessage message, boolean isSecureRequest)
message
- which send to clientSession setNew(boolean isNew)
isNew
- is the stage of sessionString getPath()
boolean isNew()
Copyright © 2018 WSO2. All rights reserved.