You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Jan Matèrne (jhm)" <ap...@materne.de> on 2013/08/27 13:05:38 UTC

MessageSupport

package org.apache.camel.impl;

public abstract class MessageSupport implements Message {

 

    /**

     * A factory method to allow a provider to lazily create the message
body

     * for inbound messages from other sources

     *

     * @return the value of the message body or null if there is no value

     *         available

     */

    protected Object createBody() {

        return null;

    }

 

 

Should this method be abstract?

Constantly returning null doesnt seems to be good to me ....

 

 

Jan


Re: MessageSupport

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah its great that you dive into camel-core. We love when ppl get
more familiar with the code base.
We are always looking for contributors, and eventually also new committers.

On Tue, Aug 27, 2013 at 1:30 PM, Jan Matèrne (jhm) <ap...@materne.de> wrote:
> Ok, I just wondered ...
>
> Jan
>
>> -----Ursprüngliche Nachricht-----
>> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Gesendet: Dienstag, 27. August 2013 13:09
>> An: dev
>> Betreff: Re: MessageSupport
>>
>> No its fine as is, according to the javadoc. Its only intended to be
>> overridden for special use-cases.
>>
>> On Tue, Aug 27, 2013 at 1:05 PM, Jan Matèrne (jhm) <ap...@materne.de>
>> wrote:
>> > package org.apache.camel.impl;
>> >
>> > public abstract class MessageSupport implements Message {
>> >
>> >
>> >
>> >     /**
>> >
>> >      * A factory method to allow a provider to lazily create the
>> > message body
>> >
>> >      * for inbound messages from other sources
>> >
>> >      *
>> >
>> >      * @return the value of the message body or null if there is no
>> > value
>> >
>> >      *         available
>> >
>> >      */
>> >
>> >     protected Object createBody() {
>> >
>> >         return null;
>> >
>> >     }
>> >
>> >
>> >
>> >
>> >
>> > Should this method be abstract?
>> >
>> > Constantly returning null doesnt seems to be good to me ....
>> >
>> >
>> >
>> >
>> >
>> > Jan
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

AW: MessageSupport

Posted by "Jan Matèrne (jhm)" <ap...@materne.de>.
Ok, I just wondered ...

Jan

> -----Ursprüngliche Nachricht-----
> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Gesendet: Dienstag, 27. August 2013 13:09
> An: dev
> Betreff: Re: MessageSupport
> 
> No its fine as is, according to the javadoc. Its only intended to be
> overridden for special use-cases.
> 
> On Tue, Aug 27, 2013 at 1:05 PM, Jan Matèrne (jhm) <ap...@materne.de>
> wrote:
> > package org.apache.camel.impl;
> >
> > public abstract class MessageSupport implements Message {
> >
> >
> >
> >     /**
> >
> >      * A factory method to allow a provider to lazily create the
> > message body
> >
> >      * for inbound messages from other sources
> >
> >      *
> >
> >      * @return the value of the message body or null if there is no
> > value
> >
> >      *         available
> >
> >      */
> >
> >     protected Object createBody() {
> >
> >         return null;
> >
> >     }
> >
> >
> >
> >
> >
> > Should this method be abstract?
> >
> > Constantly returning null doesnt seems to be good to me ....
> >
> >
> >
> >
> >
> > Jan
> >
> 
> 
> 
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen


Re: MessageSupport

Posted by Claus Ibsen <cl...@gmail.com>.
No its fine as is, according to the javadoc. Its only intended to be
overridden for special use-cases.

On Tue, Aug 27, 2013 at 1:05 PM, Jan Matèrne (jhm) <ap...@materne.de> wrote:
> package org.apache.camel.impl;
>
> public abstract class MessageSupport implements Message {
>
>
>
>     /**
>
>      * A factory method to allow a provider to lazily create the message
> body
>
>      * for inbound messages from other sources
>
>      *
>
>      * @return the value of the message body or null if there is no value
>
>      *         available
>
>      */
>
>     protected Object createBody() {
>
>         return null;
>
>     }
>
>
>
>
>
> Should this method be abstract?
>
> Constantly returning null doesnt seems to be good to me ....
>
>
>
>
>
> Jan
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen