pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vicente de Rivera III <thirdy.deriv...@gmail.com>
Subject Re: Pivot Web Queries and Logging
Date Sun, 23 Aug 2009 02:42:16 GMT
hi this is my Servlet,

public class TweetServlet extends QueryServlet {
    @Override
    protected Object doGet() throws ServletException {
        setSerializerClass(new BinarySerializer());
        return new Bird();
    }
}

I got this compiler error from Eclipse:

The method setSerializerClass(Class<? extends Serializer<?>>) in the type
QueryServlet is not applicable for the arguments
 (BinarySerializer)


On Sun, Aug 23, 2009 at 10:07 AM, Greg Brown <gkbrown@mac.com> wrote:

> You need to make sure you are using a serializer that supports your type.
> The default is JSONSerializer. If "Bird" implements Serializable, you can
> use BinarySerializer.
>
>
> On Aug 22, 2009, at 9:10 PM, Vicente de Rivera III wrote:
>
>  Hi, how I send user-defined types using Pivot Web Queries?
>>  Looking @ the javadocs now (w/c brings another ?, any better way to view
>> a JavaDoc than just plain Firefox?)
>>
>> /* SERVLET */
>> @SuppressWarnings("serial")
>> public class TweetServlet extends QueryServlet {
>>
>>    @Override
>>    protected Object doGet() throws ServletException {
>>        return new Bird("terdi","stereophonics");
>>    }
>>
>> }
>>
>> /* CLIENT APPLET */
>>     public void taskExecuted(Task<Object> task) {
>>                if (task == getQuery) {
>>                    s = ((Bird) task.getResult()).getUsername();
>>                    System.out.println("SUCCESS");
>>                    label.setText(s);
>>                    getQuery = null;
>>                }
>>            }
>>
>> btw, any better to log "SUCCESS" ? right now I'm relying on the Java
>> Console
>> Thanks!!
>> --
>> thirdy
>>
>
>

Mime
View raw message