Original Post
I've got an HttpListener running in a C# project. Whenever a request comes in I parse the RawUrl to get the path (/path/to/something.file) and pull out the first part which I use to determine the type of request coming in. Some examples of request I'll have to deal with...
/web/requestinfo?variable=123
/xmlrpc/
/soap/
etc... Now I've got a RequestHandlerRegistry that you can register different types of handlers and replace existing handlers either in C# or via the scripting language I'm using. The RequestParser gets the appropriate Handler instance from the RequestHandlerRegistry based on the type string it obtained from above. Then is just passes the Handler the request and it's then up to the Handler to deal with it. This will allow me to add completely new handler types through the scripting system alone. This seems similar to the Factory pattern but the RequestHandlerRegistry doesn't create anything, just passes out instances that are registered with it. I'm mainly hoping to find common pitfalls associated with this type of design before I start heavily working on the actual Handlers themselves. Thanks! Tim