Hi,

I think a more simple question is, could I find any sample in shindig, which
will run code into GadgetsHanlder.java? Thanks.


Thanks,

Kevin Zhang (凯峰)
Gtalk:   [email protected]
Blog:    http://www.zhangkf.com
Twitter: http://twitter.com/zhangkf


2010/9/4 Kai Feng Zhang <[email protected]>

> Hi,
>
> Just checked past archived mailing list, but unluckily not found any clue
> about how this GadgetsHandler.java works.
>
> I found in DefaultGuiceModule.java:
>
>    /**
>
>    * Sets up multibinding for rpc handlers
>
>    */
>
>   protected void registerGadgetHandlers() {
>
>     Multibinder<Object> handlerBinder = Multibinder.newSetBinder(binder(),
>> Object.class, Names.named("org.apache.shindig.handlers"));
>
>     handlerBinder.addBinding().to(InvalidationHandler.class);
>
>     handlerBinder.addBinding().to(HttpRequestHandler.class);
>
>     handlerBinder.addBinding().to(GadgetsHandler.class);
>
>   }
>
>
> So I guess GadgetsHandler.java is for rpc request, right?
>
> Simply access http://localhost:8080/rpc/gadgets/@metadata.supportedFieldswill 
> not reutrn something, because JsonRpcServlet will check if this is a
> jsonp request or along with some param like as "method" id "id".
>
> I just want to make sure if my guess is correct. And I also want to know
> under what request the method in GadgetsHanlder will be executed:
>
>   @Operation(httpMethods = "GET", path = "/@metadata.supportedFields")
>
>   public Set<String> supportedFields(RequestItem request) {
>
>     return ImmutableSet.copyOf(beanFilter
>
>         .getBeanFields(GadgetsHandlerApi.MetadataResponse.class, 5));
>
>   }
>
>
> I appreciate it.
>
>
>
>
> Thanks,
>
> Kevin Zhang (凯峰)
> Gtalk:   [email protected]
> Blog:    http://www.zhangkf.com
> Twitter: http://twitter.com/zhangkf
>
>
> On Fri, Sep 3, 2010 at 10:27 PM, Kai Feng Zhang <[email protected]>wrote:
>
>> Hi,
>>
>> I am new to Shindig code, Now I am wondering with what request, code will
>> go into some method of GadgetsHandler.java?
>>
>> Should it be a rest reqeust? like as:
>>
>> http://localhost:8080/rest/gadgets/@metadata.supportedFields
>>
>> or
>>
>> http://localhost:8080/social/rest/gadgets/@metadata.supportedFields
>>
>> But there is "no service definied for path
>> gadgets/@metadata.supportedFields". And page got 501 error.
>>
>> If I access directly:
>> http://localhost:8080/gadgets/@metadata.supportedFields, there will be
>> 404 error.
>>
>> I am confused, could you please help me out?
>>
>>
>> Thanks,
>>
>> Kevin Zhang (凯峰)
>> Gtalk:   [email protected]
>> Blog:    http://www.zhangkf.com
>> Twitter: http://twitter.com/zhangkf
>>
>
>

Reply via email to