You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Dan Diephouse <da...@envoisolutions.com> on 2007/03/31 22:36:23 UTC

Conduit.send() -> Conduit.open()?

Would people be OK with renaming Conduit.send() to Conduit.open()? I think
it results in clearer semantics. We're just opening the connection then and
setting an OutputStream typically. And we certainly aren't sending the whole
message at that point.

Thoughts?
- Dan
-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Conduit.send() -> Conduit.open()?

Posted by James Strachan <ja...@gmail.com>.
+1. Anything but send :).

begin/start/prepare/createOutputStream are all good too; don't mind
too much, just not send :)

On 4/1/07, Glynn, Eoghan <eo...@iona.com> wrote:
>
>
> Sure, knock yourself out :)
>
> As a method name, send() was always bit of a misnomer. Depends on the
> transport implementation whether anything is actually sent in advance of
> the output stream being flush()ed/close()ed. HTTP would stream data onto
> the wire as the content is written (assuming chunking is enabled), but
> AFAIK JMS doesn't write anything until the entire payload has been
> assembled.
>
> Now open() sounds to me like a sort of one-off operation, only required
> to be called once per Conduit, not once per message. Something like
> prepare() or getContent() would be other options. But I'm not hung up on
> it either way.
>
> /Eoghan
>
> > -----Original Message-----
> > From: Dan Diephouse [mailto:dan@envoisolutions.com]
> > Sent: 31 March 2007 21:36
> > To: cxf-dev@incubator.apache.org
> > Subject: Conduit.send() -> Conduit.open()?
> >
> > Would people be OK with renaming Conduit.send() to
> > Conduit.open()? I think it results in clearer semantics.
> > We're just opening the connection then and setting an
> > OutputStream typically. And we certainly aren't sending the
> > whole message at that point.
> >
> > Thoughts?
> > - Dan
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
> >
>


-- 

James
-------
http://radio.weblogs.com/0112098/

RE: Conduit.send() -> Conduit.open()?

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Sure, knock yourself out :)

As a method name, send() was always bit of a misnomer. Depends on the
transport implementation whether anything is actually sent in advance of
the output stream being flush()ed/close()ed. HTTP would stream data onto
the wire as the content is written (assuming chunking is enabled), but
AFAIK JMS doesn't write anything until the entire payload has been
assembled. 

Now open() sounds to me like a sort of one-off operation, only required
to be called once per Conduit, not once per message. Something like
prepare() or getContent() would be other options. But I'm not hung up on
it either way.

/Eoghan

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com] 
> Sent: 31 March 2007 21:36
> To: cxf-dev@incubator.apache.org
> Subject: Conduit.send() -> Conduit.open()?
> 
> Would people be OK with renaming Conduit.send() to 
> Conduit.open()? I think it results in clearer semantics. 
> We're just opening the connection then and setting an 
> OutputStream typically. And we certainly aren't sending the 
> whole message at that point.
> 
> Thoughts?
> - Dan
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>