Borges::Session (Class)

In: lib/Borges/RequestHandler/Session.rb
Parent: Object

Public Class methods

Creates a new session that is attached to application app.

HACK This is totally bogus!

Returns Session’s default preferences.

Public Instance methods

Registers continuation cont, returning a URL to resume it.

Creates a URL for str rooted from the application’s path.

Returns the active state of this Session. A handler is active if it has been accessed within the session expiry time.

Add filter to the filters active for the session.

Returns the application this session is attached to.

Returns the base path from the Session’s application.

Creates an environment for executing code within a session.

Creates a new session with for req.

Returns the class to use for error handling from this application’s preferences.

Wraps a block within filter.

Creates and returns an error page for e

Creates a Response for req.

Does the work of handling the request inside the Session thread.

Passes block into the session’s thread for processing.

TODO Refactor into initialize

HACK Thread.current[:session] is a hack

Invokes the expiry continuation.

Returns the path of this application. A synonym for the application’s name.

Handles req for valid requests, or passes the request to unknown_request.

Creates a RedirectResponse pointing to a new URL. redirect is used to eliminate the duplicate POST problem.

Creates a RedirectResponse pointing to url.

Creates a META refresh with message that refreshes to a new URL in seconds. Used for pages that have expired.

Remove filter from the filters active for the session.

Stores a response point and passes its URL to block. When the action for the URL is invoked, it will pass to the request to a list of filters for processing.

Must be wrapped in with_escape_continuation.

Creates a response for block.

Creates a response page for req.

Invokes the escape continuation, returning res to where with_escape_continuation was called.

Abstract method that starts the session.

Starts up the session’s thread.

A new Session is created for a request for an unknown page.

Wraps a block with an error handler that will create an error response for any exception.

Wraps block with a continuation that returns the value of the block to the point of call, and stores the continuation in @escape_continuation.

Wraps cont in a proc that restores the state at time of creation.

[Validate]