On Fri, Jan 15, 2010 at 5:09 PM, Johan Haleby <[email protected]> wrote:
>
> That won't help because hasEndpoint checks the full uri, not just the scheme.
> A work-around would be to do something like "hasComponent(new
> URI(endpointURI).getScheme())". Perhaps a method like
> "isSupportedScheme(enpointURI)" should be added to the API that does this
> for you?
>
> /Johan

CameContext.getComponentNames() return a List<String> with the schemes.


>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Jan 15, 2010 at 4:09 PM, Claus Ibsen <[email protected]>
>> wrote:
>>> Hi
>>>
>>> I think CamelContext have a list of registered endpoints you can peek in.
>>>
>>
>> And I believe 2.1 or later have a hasEndpoint(uri) method.
>>
>>
>>> On Fri, Jan 15, 2010 at 4:04 PM, Johan Haleby <[email protected]>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> How can I find out if a URI endpoint that I pass to a producer is a
>>>> valid
>>>> endpoint (i.e. that a component has been registered to handle it)? E.g.
>>>> how
>>>> can find out if "jms:queue:myqueue" is a valid endpoint and
>>>> "jsm:queue:myqueue" is not before I send it (if the JMS component has
>>>> been
>>>> registered)?
>>>>
>>>> /Johan
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27178476.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Find-if-an-endpoint-uri-is-supported-tp27178476p27179388.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to