Re: [Knobot-devel] a question on the ordering of TypeHandler
Status: Beta
Brought to you by:
rebach
|
From: <re...@gm...> - 2007-06-15 16:22:08
|
hi david, - FileServerFilter is a rwcf:TypeHandler - IEFixFilter is a rwcf:Filter - rwcf:TypeHandlerS get executed by the TypeChainFilter which is an rwcf:Filter. What happens is the following: 1. the rwcf:FilterS gets ordered by priority, higher priority are excecuted first, lower if and only if the higher-priority filters forward the request 2. With prirority 500 the TypeHandlerFilter comes into action, this creates a chain of TypeHandler so that what's returned by one TypeHandler is the input-type for the next, the goal is to create a chain which return a content-type acceptable by the client agent. From: http://development.osar.ch/documentation (this should be moved to a wymiwyg-site...) The Type Handler Filter is a filter which creates a list of TypeHandlers and forwards the request to this list. TypeHanlers are itself very similar to Filters, in fact they implement the same java clas= s. * The description of a TypeHandler contains the media type it returns, if the handler requires some input data the media-types such data must be is specified. (an exception for TypeBlindHandlers as well as for TypeHandlers implementing the Java Interface TypeHandler, this rarely used features need some redesign) * The desciption of a TypeHandler may force authentification by being of type rwcf:PermissionEnforcer The Type Hanlder Filter constructs the chain of TypeHandlers by iterating through the available TypeHandlers in descending order of rwcf:priority, when a TypeHandlers matches the current request and has the desired target-typeit if added to the chainand the iteration through the available TypeHandlers starts over omiting those already in the chain. This processed is repeated till a terminal chain is found, a terminal chain is one that ends with a TypeHandler which needs no input data. basing on the request it receives so that the changes made by previous Filters inluence the selection of TypeHandlers. 3. If no type-handler chain can be created the request is forwarded to the next rwcf:Filter after TypeHandlerFilter, possibly getting at a filter generating a 404 or a method-not-supported error page. So setting a low priority to IEFixFilter will cause the filter to be executed iff no previous filter can handle the request, which includes that no type-handler filter chain can be created, which in turn includes that FileServerFilter cannot serve a file. reto PS: http://jena.hpl.hp.com/juc2006/proceedings/bachmann-gmur/paper.pdf also has some infos about FilterS and TypeHandlerS dbu wrote: > hi, > > i am experimenting with caching and the IEFixFilter. > i realised that the FileServerFilter gets called after the IEFixFilter.= =20 > the iefix-section.rdf defines the priority of the iefix, fs-section.rdf= =20 > that of the fileserver. > i tried to put iefixfilter priority lower than that of the filefilter, = > but this results in iefixfilter not being used at all. > how can i control which filters are used on a request and in what order= ?=20 > or can't i use several handlers on one request? > > cheers,david > > -----------------------------------------------------------------------= -- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Knobot-devel mailing list > Kno...@li... > https://lists.sourceforge.net/lists/listinfo/knobot-devel > =20 |