camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: Stream - uri invalid ?
Date Mon, 13 Jul 2009 11:38:55 GMT
OK.

Another question. I don't see in the code of StreamConsumer How the fileName
variable passed as parameter in the uri is extracted and added to the
property fileName of the endpoint object used by the method :
resolveStreamFromFile()

private OutputStream resolveStreamFromFile() throws IOException {
        String fileName = endpoint.getFileName();



On Mon, Jul 13, 2009 at 1:13 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Hi
>
> Yeah file language is not supported in stream. It only accepts plain
> strings.
>
> If using Java DSL you can concat the string yourself, use
> String.format, or use .fromF / .toF
>
> In Spring DSL you can define an <endpoin id="xxx" uri="..."/> and use
> spring property placeholders
>
> And use <from ref="xxx"/> to refer to it
>
>
> On Mon, Jul 13, 2009 at 12:43 PM, Charles Moulliard<cmoulliard@gmail.com>
> wrote:
> > Hi,
> >
> > It seems that we can't use the following stream uri :
> >
> >
> stream:file://${karaf.base}?fileName=/data/log/quickfix.log&scanStream=true
> >
> > Caused by: java.lang.IllegalArgumentException: Invalid uri, valid form:
> > 'stream:{in,file,url}'
> >    at
> >
> org.apache.camel.component.stream.StreamConsumer.validateUri(StreamConsumer.java:225)
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message