Class RestReactiveSessionProvider

java.lang.Object
ai.yda.framework.channel.rest.spring.streaming.session.RestReactiveSessionProvider
All Implemented Interfaces:
ai.yda.framework.session.core.ReactiveSessionProvider

@Component public class RestReactiveSessionProvider extends Object implements ai.yda.framework.session.core.ReactiveSessionProvider
Provides methods for storing and retrieving data associated with a Session using a key-value store within a REST context in a reactive manner.
Since:
0.1.0
  • Constructor Details

  • Method Details

    • put

      public reactor.core.publisher.Mono<Void> put(String key, Object value)
      Stores an object in the Session with the specified key.
      Specified by:
      put in interface ai.yda.framework.session.core.ReactiveSessionProvider
      Parameters:
      key - the key with which the object is to be associated.
      value - the object to be stored in the Session.
    • get

      public reactor.core.publisher.Mono<Object> get(String key)
      Retrieves an object from the Session associated with the specified key.
      Specified by:
      get in interface ai.yda.framework.session.core.ReactiveSessionProvider
      Parameters:
      key - the key whose associated value is to be retrieved.
      Returns:
      an reactor.core.publisher.Mono<Object> containing the value associated with the key, or an empty Mono if the key does not exist in the Session.