Serialization

3 views
Skip to first unread message

Robert "kebernet" Cooper

unread,
Apr 3, 2009, 8:03:46 PM4/3/09
to rocke...@googlegroups.com
Hello Rocket GWT people!

I have been struggling with the Rocket serialization mechanism because I am wanting a symmetric client serialization system. While the doclet annotation system seems to work, it doesn't seem to deal with generics at all down stream. For example:

public class TestContextItem implements WindowContextItem {
    /**
     * @serialization-type com.totsp.gwittir.example.client.TestContextItem.SomethingElse
     */
    private List somethings;
    private String string;
    private int intPropert;

    // getters and setters omitted.

    public static class SomethingElse implements Serializable {
        private String world;
        //getters and setters omitted.
    }
       
}

I started with the wiki docs, but was getting a index out of bounds on SerializationFactoryGenerator:800, and followed back to find the new values, but the generic declaration on the array on the ArrayList internal is causing problems.

ava.lang.AssertionError: Unable to find array component type "E extends java.lang.Object".

at rocket.util.client.Checker.fail(Checker.java:41)

at rocket.util.client.Checker.handleNull(Checker.java:60)


I have tried using a genericized ArrayList and not, but I end up with the same breakdown on ArrayList serialization.



BTW SerializationFactoryGenerator like 797+ should be:

                if (values.size() < index -1 ) {
throw new SerializationException("Unable to locate \"" + SerializationConstants.CONTAINER_TYPE + "\" on field " + field);
}
final String typeName = (String) values.get(index);


So I guess the big questions are: Is the serialization API going to be supported in the future? Should I punt on this or try and work around it?


--
:Robert "kebernet" Cooper
::kebe...@gmail.com
Alice's cleartext
Charlie is the attacker
Bob signs and encrypts
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8

Miroslav Pokorny

unread,
Apr 3, 2009, 11:18:41 PM4/3/09
to rocke...@googlegroups.com, rocke...@googlegroups.com
I have a close to finished serializer that is symmetrical in that it provides it's own factories and object in/ out streams but uses the gwt generated serializers. 

Sometime when I get time I hope to package individual components separately rather than the one big lump of code that it is now.

If you want to help I can zip up my incomplete project which is a work in progress. I would Have to check but I'm sure the serialization stuff is complete and works with with genetics etc.

Hth

Miroslav Pokorny

unread,
Apr 3, 2009, 11:24:23 PM4/3/09
to rocke...@googlegroups.com, rocke...@googlegroups.com
I forgot to day the new stuff is still symmetrical in that the client or server can consume streams that they themselves produce.


On 04/04/2009, at 11:03 AM, "Robert \"kebernet\" Cooper" <kebe...@gmail.com> wrote:

Robert "kebernet" Cooper

unread,
Apr 6, 2009, 10:06:09 AM4/6/09
to rocke...@googlegroups.com
That would actually be great. I am in need of an "all client side" serialization mechanism and would rather not reinvent that particular wheel.

mP

unread,
Apr 13, 2009, 5:38:13 PM4/13/09
to rocket-gwt
Goto the files section for the wip files. If you have any q feel free
to ask.

On Apr 7, 12:06 am, "Robert \"kebernet\" Cooper" <keber...@gmail.com>
wrote:
> That would actually be great. I am in need of an "all client side"
> serialization mechanism and would rather not reinvent that particular wheel.
>
> On Fri, Apr 3, 2009 at 11:24 PM, Miroslav Pokorny <
>
>
>
> miroslav.poko...@gmail.com> wrote:
> > I forgot to day the new stuff is still symmetrical in that the client or
> > server can consume streams that they themselves produce.
>
> > On 04/04/2009, at 11:03 AM, "Robert \"kebernet\" Cooper" <
> > :: <keber...@gmail.com>keber...@gmail.com
> > Alice's cleartext
> > Charlie is the attacker
> > Bob signs and encrypts
> > <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8>
> >http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8
>
> --
> :Robert "kebernet" Cooper
> ::keber...@gmail.com
Reply all
Reply to author
Forward
0 new messages