Class RestSessionProvider
java.lang.Object
ai.yda.framework.channel.rest.spring.session.RestSessionProvider
- All Implemented Interfaces:
ai.yda.framework.session.core.SessionProvider
@Component
public class RestSessionProvider
extends Object
implements ai.yda.framework.session.core.SessionProvider
Provides methods for storing and retrieving data associated with a Session using a key-value store in the REST
context.
This component interacts with the HttpSession to manage Session attributes. It provides methods to
add and retrieve objects from the Session based on a key.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionRestSessionProvider(jakarta.servlet.http.HttpSession httpSession) Constructs a newRestSessionProviderinstance with the specifiedHttpSession. -
Method Summary
-
Constructor Details
-
RestSessionProvider
public RestSessionProvider(jakarta.servlet.http.HttpSession httpSession) Constructs a newRestSessionProviderinstance with the specifiedHttpSession.- Parameters:
httpSession- theHttpSessionto be used for storing and retrieving Session attributes.
-
-
Method Details
-
put
Stores an object in the Session with the specified key.- Specified by:
putin interfaceai.yda.framework.session.core.SessionProvider- Parameters:
key- the key with which the object is to be associated.value- the object to be stored in the Session.
-
get
Retrieves an object from the Session associated with the specified key.
-