Package com.codingchili.core.listener
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 TypeMethodDescriptioncontext()
io.vertx.core.Future<T>
Creates a new session.io.vertx.core.Future<T>
Creates a new session.io.vertx.core.Future<Void>
Destroys a session.io.vertx.core.Future<Boolean>
Checks if a session is active.Constructs a query that can be used to search for existing sessions.io.vertx.core.Future<Void>
Updates the data stored in a session.
-
Method Details
-
create
Creates a new session.- Parameters:
home
- event bus messages will be sent to this address.- Returns:
- callback
-
create
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
Updates the data stored in a session.- Parameters:
session
- the session to be updated.- Returns:
- callback
-
destroy
Destroys a session.- Parameters:
session
- the session to be destroyed.- Returns:
- callback
-
isActive
Checks if a session is active.- Parameters:
session
- the session to check if active.- Returns:
- callback.
-
query
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.
-