Class ClusteredSessionFactory

java.lang.Object
com.codingchili.core.listener.ClusteredSessionFactory
All Implemented Interfaces:
SessionFactory<com.codingchili.core.listener.ClusteredSession>

public class ClusteredSessionFactory extends Object implements SessionFactory<com.codingchili.core.listener.ClusteredSession>
Creates new sessions and manages existing.
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static io.vertx.core.Future<ClusteredSessionFactory> get(CoreContext core)
    • isActive

      public io.vertx.core.Future<Boolean> isActive(com.codingchili.core.listener.ClusteredSession session)
      Description copied from interface: SessionFactory
      Checks if a session is active.
      Specified by:
      isActive in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      session - the session to check if active.
      Returns:
      callback.
    • query

      public QueryBuilder<com.codingchili.core.listener.ClusteredSession> query(String attribute)
      Description copied from interface: SessionFactory
      Constructs a query that can be used to search for existing sessions.
      Specified by:
      query in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      attribute - the name of the attribute to query on.
      Returns:
      a fluent query builder.
    • destroy

      public io.vertx.core.Future<Void> destroy(com.codingchili.core.listener.ClusteredSession session)
      Description copied from interface: SessionFactory
      Destroys a session.
      Specified by:
      destroy in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      session - the session to be destroyed.
      Returns:
      callback
    • update

      public io.vertx.core.Future<Void> update(com.codingchili.core.listener.ClusteredSession session)
      Description copied from interface: SessionFactory
      Updates the data stored in a session.
      Specified by:
      update in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      session - the session to be updated.
      Returns:
      callback
    • context

      public CoreContext context()
      Specified by:
      context in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Returns:
      the context of the session factory.
    • create

      public io.vertx.core.Future<com.codingchili.core.listener.ClusteredSession> create(String home)
      Description copied from interface: SessionFactory
      Creates a new session.
      Specified by:
      create in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      home - event bus messages will be sent to this address.
      Returns:
      callback
    • create

      public io.vertx.core.Future<com.codingchili.core.listener.ClusteredSession> create(String home, String id)
      Description copied from interface: SessionFactory
      Creates a new session.
      Specified by:
      create in interface SessionFactory<com.codingchili.core.listener.ClusteredSession>
      Parameters:
      home - event bus messages will be sent to this address.
      id - the id of the session, for identification.
      Returns:
      callback