You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Michał Kłeczek <mi...@xpro.biz> on 2014/03/09 22:45:29 UTC

SerialReflectionFactory and ObjectStreamContext

Peter,

Can your SerialReflectionFactory expose an API to interact with the stream? It 
would be enough to be able to retrieve context Collection from 
ObjectStreamContext.

Thanks,

-- 
Michał Kłeczek
XPro Sp. z o. o.
ul. Borowskiego 2
03-475 Warszawa
Polska

Re: SerialReflectionFactory and ObjectStreamContext

Posted by Michał Kłeczek <mi...@xpro.biz>.
I will prepare a patch.

I don't have any need to access ObjectOutputStream when serializing. Only 
accessing local environment when deserializing.

Thanks,
Michal

On Monday, March 10, 2014 05:57:03 PM Peter wrote:
> Serialized objects are given access to streams, you want to send in a patch?
> 
> Do you think that Distributed object's should also be given access to the
> OutputStream too?
> 
> Regards,
> 
> Peter.
> 
> ----- Original message -----
> 
> > How about introducing a builder API:
> > 
> > public My getInstance(Arg1 arg1, ObjectInputStream ois, Arg2 arg2) {...}
> > 
> > public SerialReflectionFactory substitute() {
> >
> >       return     SerialReflectionFactory.builder()
> >         .factory(My.class)
> >         .method("getInstance", ARG_TYPES)
> >         .param(p1)
> >         .streamParam()
> >         .param(p2)
> >         .build();
> >
> > }
> > 
> > where "streamParam()" would indicate a placeholder for the actual input
> > stream.
> > 
> > Thanks,
> > Michal
> > 
> > On Monday, March 10, 2014 10:48:29 AM Peter wrote:
> > > I'm open to suggestion.
> > > 
> > > Regards,
> > > 
> > > Peter.
> > > 
> > > ----- Original message -----
> > > 
> > > > Peter,
> > > > 
> > > > Can your SerialReflectionFactory expose an API to interact with the
> > > > stream? It     would be enough to be able to retrieve context
> > > > Collection from     ObjectStreamContext.
> > > > 
> > > > Thanks,
> > > 
> > > <Attachment>     Michał Kłeczek (XPro).vcf
> 
> <Attachment>   Michał Kłeczek (XPro).vcf

-- 
Michał Kłeczek
XPro Sp. z o. o.
ul. Borowskiego 2
03-475 Warszawa
Polska

Re: SerialReflectionFactory and ObjectStreamContext

Posted by Peter <ji...@zeus.net.au>.
Serialized objects are given access to streams, you want to send in a patch?

Do you think that Distributed object's should also be given access to the OutputStream too?

Regards,

Peter.

----- Original message -----
> How about introducing a builder API:
> 
> public My getInstance(Arg1 arg1, ObjectInputStream ois, Arg2 arg2) {...}
> 
> public SerialReflectionFactory substitute() {
>       return     SerialReflectionFactory.builder()
>         .factory(My.class)
>         .method("getInstance", ARG_TYPES)
>         .param(p1)
>         .streamParam()
>         .param(p2)
>         .build();
> }
> 
> where "streamParam()" would indicate a placeholder for the actual input 
> stream.
> 
> Thanks,
> Michal
> 
> On Monday, March 10, 2014 10:48:29 AM Peter wrote:
> > I'm open to suggestion.
> > 
> > Regards,
> > 
> > Peter.
> > 
> > ----- Original message -----
> > 
> > > Peter,
> > > 
> > > Can your SerialReflectionFactory expose an API to interact with the
> > > stream? It     would be enough to be able to retrieve context
> > > Collection from     ObjectStreamContext.
> > > 
> > > Thanks,
> > 
> > <Attachment>     Michał Kłeczek (XPro).vcf
> 
> -- 
> Michał Kłeczek
> XPro Sp. z o. o.
> ul. Borowskiego 2
> 03-475 Warszawa
> Polska

<Attachment>   Michał Kłeczek (XPro).vcf


Re: SerialReflectionFactory and ObjectStreamContext

Posted by Michał Kłeczek <mi...@xpro.biz>.
How about introducing a builder API:

public My getInstance(Arg1 arg1, ObjectInputStream ois, Arg2 arg2) {...}

public SerialReflectionFactory substitute() {
   return   SerialReflectionFactory.builder()
    .factory(My.class)
    .method("getInstance", ARG_TYPES)
    .param(p1)
    .streamParam()
    .param(p2)
    .build();
}

where "streamParam()" would indicate a placeholder for the actual input 
stream.

Thanks,
Michal

On Monday, March 10, 2014 10:48:29 AM Peter wrote:
> I'm open to suggestion.
> 
> Regards,
> 
> Peter.
> 
> ----- Original message -----
> 
> > Peter,
> > 
> > Can your SerialReflectionFactory expose an API to interact with the
> > stream? It   would be enough to be able to retrieve context Collection
> > from   ObjectStreamContext.
> > 
> > Thanks,
> 
> <Attachment>   Michał Kłeczek (XPro).vcf

-- 
Michał Kłeczek
XPro Sp. z o. o.
ul. Borowskiego 2
03-475 Warszawa
Polska

Re: SerialReflectionFactory and ObjectStreamContext

Posted by Peter <ji...@zeus.net.au>.
I'm open to suggestion.

Regards,

Peter.

----- Original message -----
> Peter,
> 
> Can your SerialReflectionFactory expose an API to interact with the
> stream? It   would be enough to be able to retrieve context Collection
> from   ObjectStreamContext.
> 
> Thanks,
> 
> -- 
> Michał Kłeczek
> XPro Sp. z o. o.
> ul. Borowskiego 2
> 03-475 Warszawa
> Polska

<Attachment>   Michał Kłeczek (XPro).vcf