Property | Type | Description | |
---|---|---|---|
$application | AppserverIo\Psr\Application\ApplicationInterface | The application instance. | |
$garbageCollector | AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface | The garbage collector instance. | |
$managerConfiguration | AppserverIo\Psr\Application\ManagerConfigurationInterface | The manager configuration instance. | |
$sessionHandlers | AppserverIo\Collections\HashMap | The HashMap containing the session handlers. | |
$sessionMarshaller | AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface | The session marshaller instance. | |
$sessionSettings | AppserverIo\Appserver\ServletEngine\SessionSettingsInterface | The settings for the session handling. | |
$sessions | AppserverIo\Collections\HashMap | The HashMap containing the sessions. |
Method | Description | |
---|---|---|
__construct ( ) | Initialize the session manager. | |
__destruct ( ) | Save the sessions back to the persistence layer. | |
attach ( AppserverIo\Psr\Servlet\ServletSessionInterface $session ) : void | Attaches the passed session to the manager and returns the instance. | |
create ( mixed $id, string $name, integer | DateTime $lifetime = null, integer | null $maximumAge = null, string | null $domain = null, string $path = null, boolean $secure = null, boolean $httpOnly = null ) : AppserverIo\Psr\Servlet\ServletSessionInterface | Creates a new session with the passed session ID and session name if given. | |
find ( string $id ) : AppserverIo\Psr\Servlet\Http\ServletSessionInterface | null | Tries to find a session for the given request. The session-ID will be searched in the cookie header of the request, and in the request query string. If both values are present, the value in the query string takes precedence. If no session id is found, a new one is created and assigned to the request. | |
flush ( ) : void | Flushes the session storage and persists all sessions. | |
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface | Returns the application instance. | |
getAttribute ( string $key ) : mixed | null | Returns the attribute with the passed key from the container. | |
getGarbageCollector ( ) : AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface | Returns the garbage collector instance. | |
getIdentifier ( ) : string | Initializes the manager instance. | |
getLogger ( string $loggerName ) : Psr\Log\LoggerInterface | Return's the logger with the requested name. First we look in the application and then in the system itself. | |
getManagerConfiguration ( ) : AppserverIo\Psr\Application\ManagerConfigurationInterface | Return's the manager configuration. | |
getPersistenceManager ( ) : AppserverIo\Appserver\ServletEngine\FilesystemPersistenceManager | Returns the persistence manager instance. | |
getServletManager ( ) : AppserverIo\Psr\Servlet\ServletContextInterface | Returns the servlet manager instance. | |
getSessionFactory ( ) : AppserverIo\Appserver\ServletEngine\SessionFactory | Returns the session factory. | |
getSessionHandlers ( ) : AppserverIo\Collections\ArrayList | Returns all registered session handlers. | |
getSessionMarshaller ( ) : AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface | Returns the session marshaller. | |
getSessionPool ( ) : AppserverIo\Storage\StorageInterface | Returns the session pool instance. | |
getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface | Returns the session settings. | |
getSessions ( ) : AppserverIo\Collections\HashMap | Returns all sessions actually attached to the session manager. | |
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | Initializes the session manager. | |
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | Inject the application instance. | |
injectGarbageCollector ( AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface $garbageCollector ) : void | Injects the garbage collector. | |
injectManagerConfiguration ( AppserverIo\Psr\Application\ManagerConfigurationInterface $managerConfiguration ) : void | Inject the configuration for this manager. | |
injectSessionHandlers ( AppserverIo\Collections\CollectionInterface $sessionHandlers ) : void | Inject the session handlers. | |
injectSessionMarshaller ( AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface $sessionMarshaller ) : void | Injects the session marshaller. | |
injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void | Injects the session settings. | |
stop ( ) : void | Shutdown the session manager instance. |
public create ( mixed $id, string $name, integer | DateTime $lifetime = null, integer | null $maximumAge = null, string | null $domain = null, string $path = null, boolean $secure = null, boolean $httpOnly = null ) : AppserverIo\Psr\Servlet\ServletSessionInterface | ||
$id | mixed | The session ID |
$name | string | The session name |
$lifetime | integer | DateTime | Date and time after the session expires |
$maximumAge | integer | null | Number of seconds until the session expires |
$domain | string | null | The host to which the user agent will send this cookie |
$path | string | The path describing the scope of this cookie |
$secure | boolean | If this cookie should only be sent through a "secure" channel by the user agent |
$httpOnly | boolean | If this cookie should only be used through the HTTP protocol |
return | AppserverIo\Psr\Servlet\ServletSessionInterface | The requested session |
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface | ||
return | AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface | The application instance |
public getGarbageCollector ( ) : AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface | ||
return | AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface | The garbage collector instance |
public getIdentifier ( ) : string | ||
return | string |
public getManagerConfiguration ( ) : AppserverIo\Psr\Application\ManagerConfigurationInterface | ||
return | AppserverIo\Psr\Application\ManagerConfigurationInterface | The manager configuration |
public getPersistenceManager ( ) : AppserverIo\Appserver\ServletEngine\FilesystemPersistenceManager | ||
return | AppserverIo\Appserver\ServletEngine\FilesystemPersistenceManager | The persistence manager instance |
public getServletManager ( ) : AppserverIo\Psr\Servlet\ServletContextInterface | ||
return | AppserverIo\Psr\Servlet\ServletContextInterface | The servlet manager instance |
public getSessionFactory ( ) : AppserverIo\Appserver\ServletEngine\SessionFactory | ||
return | AppserverIo\Appserver\ServletEngine\SessionFactory | The session factory instance |
public getSessionHandlers ( ) : AppserverIo\Collections\ArrayList | ||
return | AppserverIo\Collections\ArrayList | The session handlers |
public getSessionMarshaller ( ) : AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface | ||
return | AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface | The session marshaller |
public getSessionPool ( ) : AppserverIo\Storage\StorageInterface | ||
return | AppserverIo\Storage\StorageInterface | The session pool |
public getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface | ||
return | AppserverIo\Appserver\ServletEngine\SessionSettingsInterface | The session settings |
public getSessions ( ) : AppserverIo\Collections\HashMap | ||
return | AppserverIo\Collections\HashMap | The container with sessions |
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | ||
$application | AppserverIo\Psr\Application\ApplicationInterface | The application instance |
return | void |
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | ||
$application | AppserverIo\Psr\Application\ApplicationInterface | The application instance |
return | void |
public injectGarbageCollector ( AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface $garbageCollector ) : void | ||
$garbageCollector | AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface | The garbage collector |
return | void |
public injectManagerConfiguration ( AppserverIo\Psr\Application\ManagerConfigurationInterface $managerConfiguration ) : void | ||
$managerConfiguration | AppserverIo\Psr\Application\ManagerConfigurationInterface | The managers configuration |
return | void |
public injectSessionHandlers ( AppserverIo\Collections\CollectionInterface $sessionHandlers ) : void | ||
$sessionHandlers | AppserverIo\Collections\CollectionInterface | The session handlers |
return | void |
public injectSessionMarshaller ( AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface $sessionMarshaller ) : void | ||
$sessionMarshaller | AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface | The session marshaller instance |
return | void |
public injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void | ||
$sessionSettings | AppserverIo\Appserver\ServletEngine\SessionSettingsInterface | Settings for the session handling |
return | void |
protected ApplicationInterface,AppserverIo\Psr\Application $application | ||
return | AppserverIo\Psr\Application\ApplicationInterface |
protected GarbageCollectorInterface,AppserverIo\Appserver\ServletEngine $garbageCollector | ||
return | AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface |
protected ManagerConfigurationInterface,AppserverIo\Psr\Application $managerConfiguration | ||
return | AppserverIo\Psr\Application\ManagerConfigurationInterface |
protected HashMap,AppserverIo\Collections $sessionHandlers | ||
return | AppserverIo\Collections\HashMap |
protected SessionMarshallerInterface,AppserverIo\Appserver\ServletEngine $sessionMarshaller | ||
return | AppserverIo\Appserver\ServletEngine\SessionMarshallerInterface |
protected SessionSettingsInterface,AppserverIo\Appserver\ServletEngine $sessionSettings | ||
return | AppserverIo\Appserver\ServletEngine\SessionSettingsInterface |