Interface SessionFactory<T extends Session>

All Known Implementing Classes:
ClusteredSessionFactory

public interface SessionFactory<T extends Session>
An interface which defines the functionality of a session provider.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    io.vertx.core.Future<T>
    create​(String home)
    Creates a new session.
    io.vertx.core.Future<T>
    create​(String home, String id)
    Creates a new session.
    io.vertx.core.Future<Void>
    destroy​(T session)
    Destroys a session.
    io.vertx.core.Future<Boolean>
    isActive​(T session)
    Checks if a session is active.
    query​(String attribute)
    Constructs a query that can be used to search for existing sessions.
    io.vertx.core.Future<Void>
    update​(T session)
    Updates the data stored in a session.
  • Method Details

    • create

      io.vertx.core.Future<T> create(String home)
      Creates a new session.
      Parameters:
      home - event bus messages will be sent to this address.
      Returns:
      callback
    • create

      io.vertx.core.Future<T> create(String home, String id)
      Creates a new session.
      Parameters:
      home - event bus messages will be sent to this address.
      id - the id of the session, for identification.
      Returns:
      callback
    • update

      io.vertx.core.Future<Void> update(T session)
      Updates the data stored in a session.
      Parameters:
      session - the session to be updated.
      Returns:
      callback
    • destroy

      io.vertx.core.Future<Void> destroy(T session)
      Destroys a session.
      Parameters:
      session - the session to be destroyed.
      Returns:
      callback
    • isActive

      io.vertx.core.Future<Boolean> isActive(T session)
      Checks if a session is active.
      Parameters:
      session - the session to check if active.
      Returns:
      callback.
    • query

      QueryBuilder<T> query(String attribute)
      Constructs a query that can be used to search for existing sessions.
      Parameters:
      attribute - the name of the attribute to query on.
      Returns:
      a fluent query builder.
    • context

      CoreContext context()
      Returns:
      the context of the session factory.