On Nov 16, 2007 6:36 PM, lyifan <[EMAIL PROTECTED]> wrote:
>
> for an instance, if address, port, ssl are saved in a config file, I have to
> pass a ConfigFile object as the parameter of the HttpTransport constructor.
>

Are you just looking for a way to configure an HttpTransport instance
with prescribed values?
If so, ioc Symbols may be what you're looking for:
http://tapestry.apache.org/tapestry5/tapestry-ioc/symbols.html

On the other hand, you mentioned in your OP that these values come
from the HttpRequest, so perhaps you have a different need altogether?

What's the lifespan of an HttpTransport instance?  Where do the
address, port and ssl values come from, and _when_?

As Chris mentioned, the TapestryModule makes a per-thread Request
available to you, so getting the container to build and inject a
per-thread HttpTransport instance would be easy, if thats what you're
looking for: add a builder method to your app module that takes in
Request, mark it as per-thread with @Scope, have it instantiate and
return an HttpTransport instance and have this injected into your
page/component.
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/Request.html

Don't know if any of that helps - we may need a little more context to
understand your question.

Cheers,
lasitha

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to