[
https://issues.apache.org/jira/browse/CAMEL-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983501#action_12983501
]
Ben O'Day commented on CAMEL-2989:
----------------------------------
hey James, I started looking into adding to camel-web's endpoints page. Any
reason we couldn't use the CamelContext getEndpointMap() API for this?
Something like this could return all endpoints matching a given pattern
(component prefix, etc.)...
//find all file endpoints
String filter = "file:";
Map<String, Endpoint> map = this.context.getEndpointMap();
Set<Map.Entry<String, Endpoint>> entries = map.entrySet();
ArrayList<String> matches = new ArrayList<String>();
for (Map.Entry<String, Endpoint> entry : entries) {
if(entry.getKey().indexOf(filter) != -1) {
matches.add(entry.getKey());
}
}
System.out.println("matches->" + matches);
> provider an API to query available endpoints on a component
> -----------------------------------------------------------
>
> Key: CAMEL-2989
> URL: https://issues.apache.org/jira/browse/CAMEL-2989
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.4.0
> Reporter: james strachan
> Fix For: 3.0.0
>
>
> many components like file, activemq, nmr, jbi, database all are capable of
> browsing the available endpoints that a user could use from, say, a command
> line tool or from camel-web.
> So we should add a browse API that lets you query a component for available
> endpoints.
> Maybe allow things to be browsed in a tree kind of way - maybe with a text
> search type thing (for completion boxes etc)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.