Package com.codingchili.core.listener
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 TypeMethodDescriptioncontext()
io.vertx.core.Future<com.codingchili.core.listener.ClusteredSession>
Creates a new session.io.vertx.core.Future<com.codingchili.core.listener.ClusteredSession>
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>
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.
-
Method Details
-
get
-
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 interfaceSessionFactory<com.codingchili.core.listener.ClusteredSession>
- Parameters:
session
- the session to check if active.- Returns:
- callback.
-
query
Description copied from interface:SessionFactory
Constructs a query that can be used to search for existing sessions.- Specified by:
query
in interfaceSessionFactory<com.codingchili.core.listener.ClusteredSession>
- Parameters:
attribute
- the name of the attribute to query on.- Returns:
- a fluent query builder.
-
destroy
Description copied from interface:SessionFactory
Destroys a session.- Specified by:
destroy
in interfaceSessionFactory<com.codingchili.core.listener.ClusteredSession>
- Parameters:
session
- the session to be destroyed.- Returns:
- callback
-
update
Description copied from interface:SessionFactory
Updates the data stored in a session.- Specified by:
update
in interfaceSessionFactory<com.codingchili.core.listener.ClusteredSession>
- Parameters:
session
- the session to be updated.- Returns:
- callback
-
context
- Specified by:
context
in interfaceSessionFactory<com.codingchili.core.listener.ClusteredSession>
- Returns:
- the context of the session factory.
-
create
Description copied from interface:SessionFactory
Creates a new session.- Specified by:
create
in interfaceSessionFactory<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 interfaceSessionFactory<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
-