C# Класс Spring.Web.Support.PageHandlerFactory

Implementation of System.Web.IHttpHandlerFactory that retrieves configured IHttpHandler instances from Spring web application context.

This handler factory uses the page name from the URL, without the extension, to find the handler object in the Spring context. This means that the target object definition doesn't need to resolve to an .aspx page -- it can be any valid object that implements IHttpHandler interface.

If the specified page is not found in the Spring application context, this handler factory falls back to the standard ASP.NET behavior and tries to find physical page with a given name.

In either case, handlers that implement IApplicationContextAware and ISharedStateAware will be provided with the references to appropriate Spring.NET application context (based on the request URL) and a IDictionary that should be used to store the information that needs to be shared by all instances of the handler.

Наследование: Spring.Web.Support.AbstractHandlerFactory
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetHandler ( HttpContext context, string requestType, string url, string physicalPath ) : IHttpHandler

Retrieves instance of the configured page from Spring web application context, or if page is not defined in Spring config file tries to find it using standard ASP.Net mechanism.

Защищенные методы

Метод Описание
CreateHandlerInstance ( IConfigurableApplicationContext appContext, HttpContext context, string requestType, string rawUrl, string physicalPath ) : IHttpHandler

Create a handler instance for the given URL.

Описание методов

CreateHandlerInstance() защищенный Метод

Create a handler instance for the given URL.
protected CreateHandlerInstance ( IConfigurableApplicationContext appContext, HttpContext context, string requestType, string rawUrl, string physicalPath ) : IHttpHandler
appContext IConfigurableApplicationContext the application context corresponding to the current request
context System.Web.HttpContext The instance for this request.
requestType string The HTTP data transfer method (GET, POST, ...)
rawUrl string The requested .
physicalPath string The physical path of the requested resource.
Результат IHttpHandler

GetHandler() публичный Метод

Retrieves instance of the configured page from Spring web application context, or if page is not defined in Spring config file tries to find it using standard ASP.Net mechanism.
public GetHandler ( HttpContext context, string requestType, string url, string physicalPath ) : IHttpHandler
context System.Web.HttpContext Current HttpContext
requestType string Type of HTTP request (GET, POST, etc.)
url string Requested page URL
physicalPath string Translated server path for the page
Результат IHttpHandler