It looks like that's the only way.

One wrinkle that was not mentioned in the original post is that the
URL argument to a RequestBuilder instantiation is RESTful with
volatile path components. IOW, instance bindings will not solve this
problem.

I'm using binding annotations:
                
bind(RequestBuilder.class).annotatedWith(XXX.class).toProvider(XXXRequesterAsync.class);
bind(RequestBuilder.class).annotatedWith(YYY.class).toProvider(YYYRequesterAsync.class);

I'm using the provider binding because I want only one instance of
each implementing class.

The XXXRequesterClass knows what CGI method and URL to use when
instantiating a RequestBuilder object. The volatile URL path
components are concatenated at runtime.

Each annotation class (XXX.class, YYY.class) is an interface.

Discuss amongst yourselves.

On Fri, Aug 28, 2009 at 6:02 PM, Jeff Chimene<[email protected]> wrote:
> On 08/28/2009 05:53 PM, Jeff Chimene wrote:
>> Hi,
>>
>> I'm not enough of a Java pundit to understand how to implement a
>> RequestBuilder using Gin.
>>
>> The issue is that one cannot instantiate a RequestBuilder class w/o a
>> HTTP method and a URL.
>>
>> How does one pass these parameters in such a situation?
>
> I thought about using BindingAnnotations. I'm hoping there is Another Way.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to