org.spincast.plugins.session.SpincastSessionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-plugins-session Show documentation
Show all versions of spincast-plugins-session Show documentation
The default Spincast Session plugin
package org.spincast.plugins.session;
import java.time.Instant;
import org.spincast.core.json.JsonObject;
import com.google.inject.assistedinject.Assisted;
public interface SpincastSessionFactory {
/**
* Creates a new session.
*
* {@link SpincastSession#isNew()} will return
* true
.
*/
public SpincastSession createNewSession();
/**
* Creates a session from saved infos.
*/
public SpincastSession createSession(@Assisted("sessionId") String sessionId,
@Assisted("creationDate") Instant creationDate,
@Assisted("modificationDate") Instant modificationDate,
@Assisted("attributes") JsonObject attributes);
}