OpenFrame::WebApp::Session::Factory - a factory for various types of session


OpenFrame-WebApp documentation  | view source Contained in the OpenFrame-WebApp distribution.

Index


NAME

Top

OpenFrame::WebApp::Session::Factory - a factory for various types of session wrappers.

SYNOPSIS

Top

  use OpenFrame::WebApp::Session::Factory;

  my $sfactory = new OpenFrame::WebApp::Session::Factory()
    ->type( 'file_cache' )
    ->expiry( $period );  # optional

  my $session = $sfactory->new_session( @args );
  my $session = $sfactory->fetch_session( $id );

DESCRIPTION

Top

The OpenFrame::WebApp::Session::Factory class should be used to create sessions as needed. For convenience, it lets you specify a default session expiry period that is passed to all new sessions.

This class inherits its interface from OpenFrame::WebApp::Factory. It uses OpenFrame::WebApp::Session-types()> to resolve class names.

ADDITIONAL METHODS

Top

expiry()

set/get optional session expiry.

new_session( ... )

creates a new session wrapper of the appropriate session_type and sets its expiry() (if set). passes all arguments to the sessions' constructor.

fetch_session( $id )

fetches the session with the given $id. returns undef if not found.

AUTHOR

Top

Steve Purkis <spurkis@epn.nu>

COPYRIGHT

Top

SEE ALSO

Top

OpenFrame::WebApp::Factory, OpenFrame::WebApp::Session


OpenFrame-WebApp documentation  | view source Contained in the OpenFrame-WebApp distribution.