C# Class Castle.MonoRail.Framework.MonoRailHttpHandlerFactory

Coordinates the creation of new MonoRailHttpHandler and uses the configuration to obtain the correct factories instances.
Inheritance: IHttpHandlerFactory
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
GetHandler ( HttpContext context, String requestType, String url, String pathTranslated ) : IHttpHandler

Returns an instance of a class that implements the interface.

MonoRailHttpHandlerFactory ( ) : System

Initializes a new instance of the MonoRailHttpHandlerFactory class.

ReleaseHandler ( IHttpHandler handler ) : void

Enables a factory to reuse an existing handler instance.

Private Methods

Method Description
CreateLogger ( String name, IServiceProvider provider ) : ILogger

This might be subject to race conditions, but I'd rather take the risk - which in the end means just replacing the instance - than creating locks that will affect every single request

ObtainMonoRailHandler ( IRailsEngineContext mrContext ) : IHttpHandler
ObtainMonoRailHandlerProvider ( IRailsEngineContext mrContext ) : IMonoRailHttpHandlerProvider

Method Details

GetHandler() public method

Returns an instance of a class that implements the interface.
public GetHandler ( HttpContext context, String requestType, String url, String pathTranslated ) : IHttpHandler
context System.Web.HttpContext An instance of the class that provides references to intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests.
requestType String The HTTP data transfer method (GET or POST) that the client uses.
url String The of the requested resource.
pathTranslated String The to the requested resource.
return IHttpHandler

MonoRailHttpHandlerFactory() public method

Initializes a new instance of the MonoRailHttpHandlerFactory class.
public MonoRailHttpHandlerFactory ( ) : System
return System

ReleaseHandler() public method

Enables a factory to reuse an existing handler instance.
public ReleaseHandler ( IHttpHandler handler ) : void
handler IHttpHandler The object to reuse.
return void