You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2004/07/24 09:13:32 UTC
The Http Facility
Gang,
I am working on the HTTP Facility for Merlin, and want to be introducing the
following changes;
1. Having a configuration with <listener> at the 'root' level seems bound to
create messy config files over time, esp when new configuration parameters
are introduced.
I want us to deprecate (and possibly remove, since it is not yet released)
this way and instead use (2).
2. Introduce <listeners> as a configuration node, with the above mentioned
<listener> nodes under it.
3. Introduce
<servlets>
<servlet>
<component>/somecontainer/anothercontainer/mycomponent</component>
<url>/my-url</url>
<servlet>
</servlets>
The implementation is as straight forward as I could imagine, meaning;
In DefaultServer.initialize() store these mappings into a map, and when the
ContainmentModelHandler calls the DefaultServer.register( ComponentModel
model ), the component path gets translated prior to registering it to the
Jetty server. If there is no defined <url> for a component, the component
path is used like before.
WDYT?
Users; I am also interested to hear about any other requests that may exist,
while I am digging around in the code anyway.
Cheers
Niclas
--
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
+------//-------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
RE: The Http Facility
Posted by Stephen McConnell <mc...@apache.org>.
> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: Saturday, July 24, 2004 09:53
> To: Avalon Developers List
> Cc: Avalon Users
> Subject: Re: The Http Facility
> Importance: High
>
> On Saturday 24 July 2004 15:13, Niclas Hedhman wrote:
>
> > I am working on the HTTP Facility for Merlin, and want to be
introducing
> > the following changes;
>
> One more thing. Components that wishes to be able to serve http
requests
> must
> implement the interface called Handler. IMHO, this is a very poor
name,
> too
> generic.
>
> I am suggesting that we change this name to HttpRequestHandler.
+1
> That would also increase the 'decision requirement' whether a
compatible
> change is to be made, or we simply ignore compatibility since the
facility
> has not been released ever, and is considered unstable.
I'm strongly in favor of getting it right and getting out a first
release without any deprecation references. I.e. changing things now as
we need to because there is no backward compatibility reference point.
Cheers, Steve.
> Any opinions?
>
> Cheers
> Niclas
> --
> +------//-------------------+
> / http://www.bali.ac /
> / http://niclas.hedhman.org /
> +------//-------------------+
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@avalon.apache.org
> For additional commands, e-mail: users-help@avalon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: The Http Facility
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Saturday 24 July 2004 15:13, Niclas Hedhman wrote:
> I am working on the HTTP Facility for Merlin, and want to be introducing
> the following changes;
One more thing. Components that wishes to be able to serve http requests must
implement the interface called Handler. IMHO, this is a very poor name, too
generic.
I am suggesting that we change this name to HttpRequestHandler.
That would also increase the 'decision requirement' whether a compatible
change is to be made, or we simply ignore compatibility since the facility
has not been released ever, and is considered unstable.
Any opinions?
Cheers
Niclas
--
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
+------//-------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: The Http Facility
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Saturday 24 July 2004 21:41, Stephen McConnell wrote:
> I would not call these servlets because they are not stict servlets (the
> are instead regular component that are capable of handling HTTP servlet
> request and response messages).
>
> <mapping>
> <map>
> <url>/my-url</url>
>
> <component>/somecontainer/anothercontainer/mycomponent</component>
> </map>
> </mapping>
Ooops. Yeah that makes absolute sense.
:
or
<mappings><map>
or
<mappings><mapping>
or perhaps
<url-space>
<mapping>
<url></url>
<component></component>
</mapping>
</url-space>
I don't have any really strong opinion. As long as we can proceed quickly.
Cheers
Niclas
--
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
+------//-------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
RE: The Http Facility
Posted by Stephen McConnell <mc...@apache.org>.
> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: Saturday, July 24, 2004 09:14
> To: Avalon Developers List
> Cc: Avalon Users
> Subject: The Http Facility
> Importance: High
>
>
> Gang,
>
> I am working on the HTTP Facility for Merlin, and want to be
introducing
> the
> following changes;
>
> 1. Having a configuration with <listener> at the 'root' level seems
bound
> to
> create messy config files over time, esp when new configuration
parameters
> are introduced.
> I want us to deprecate (and possibly remove, since it is not yet
released)
> this way and instead use (2).
>
> 2. Introduce <listeners> as a configuration node, with the above
mentioned
> <listener> nodes under it.
>
> 3. Introduce
> <servlets>
> <servlet>
>
<component>/somecontainer/anothercontainer/mycomponent</component>
> <url>/my-url</url>
> <servlet>
> </servlets>
I would not call these servlets because they are not stict servlets (the
are instead regular component that are capable of handling HTTP servlet
request and response messages).
<mapping>
<map>
<url>/my-url</url>
<component>/somecontainer/anothercontainer/mycomponent</component>
</map>
</mapping>
> The implementation is as straight forward as I could imagine, meaning;
> In DefaultServer.initialize() store these mappings into a map, and
when
> the
> ContainmentModelHandler calls the DefaultServer.register(
ComponentModel
> model ), the component path gets translated prior to registering it to
the
> Jetty server. If there is no defined <url> for a component, the
component
> path is used like before.
>
> WDYT?
Sounds fine to me.
Cheers, Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org