Simply hide a complex monitoring (db-entries, log, etc.) with a simple call like "file://" "log:". I could use a bean or processor and I actually I had, but I thought its simplier so. For the caller (routedef) and for clean code.
-----Ursprüngliche Nachricht----- Von: Omar Al-Safi <omars...@gmail.com> Gesendet: Donnerstag, 19. September 2019 13:28 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? Hi Thomas, May I know what do you want to achieve here? The context of your problem can help us to know how can you move forward without much complexity involved. Regards, Omar On Thu, Sep 19, 2019, 13:20 <thomas.thi...@telekom.de> wrote: > "Scaffolding your component through maven archetype" > > I think at the moment I didn’t know much about it. > I really didn’t want to blow up pom only for a little endpoint. Or did > I not get it? > > > -----Ursprüngliche Nachricht----- > Von: Alex Dettinger <aldettin...@gmail.com> > Gesendet: Donnerstag, 19. September 2019 10:20 > An: users@camel.apache.org > Betreff: Re: own endpoint exmaple? > > Hi Thomas, > > Did you figured it out ? > From the code, it's hard to see what the issue could be: Do you > extend DefaultComponent ? Do you call setProperties() in > createEndpoint() ? and so on... > If you have not used an archetype yet, then I would direct you back > to Omar Al-Safi suggestion: Scaffolding your component through maven > archetype https://camel.apache.org/manual/latest/camel-maven-archetypes.html. > You'll then have a proper layout to start on then. > > Alex > > > On Tue, Sep 17, 2019 at 12:49 PM <thomas.thi...@telekom.de> wrote: > > > Hi, > > > > thanks so far. I didn’t know that I had to explicitely create a > Component. > > The direct example helped a lot. > > But there is this contruct, and it will not work with my code. > > name is not set. (it has getter and setter) > > > > I want that name is "thomas" when route-def is like > > > > to("monitoring:thomas") > > > > @UriEndpoint(scheme = "monitoring", title = "monitoring", > > syntax="monitoring:name", label = "Monitoring") public class > > MonitorEndpoint extends DefaultEndpoint { > > @UriPath > > @Metadata(required = true) > > private String name; > > > > public MonitorEndpoint() { > > } > > > > public MonitorEndpoint(final String endpointUri, final Component > > component) { > > super(endpointUri, component); > > } > > > > @Override > > public Consumer createConsumer(Processor processor) throws Exception { > > // TODO Auto-generated method stub > > return null; > > } > > > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > Von: Omar Al-Safi <omars...@gmail.com> > > Gesendet: Montag, 16. September 2019 13:05 > > An: users@camel.apache.org > > Betreff: Re: own endpoint exmaple? > > > > I see, yeah we will need to fix this. By the way, you can start > > scaffolding your component through maven archetype, > > https://camel.apache.org/manual/latest/camel-maven-archetypes.html, > > as I recall, it will also add the necessary files to enable camel > > auto discovery out of the box > > > > On Mon, 16 Sep 2019 at 13:01, Alex Dettinger <aldettin...@gmail.com> > > wrote: > > > > > Also, the source code of the direct component could be a good > > > starter to get inspiration: > > > > > > https://github.com/apache/camel/tree/master/components/camel-direc > > > t/ sr c/main/java/org/apache/camel/component/direct > > > > > > Alex > > > > > > On Mon, Sep 16, 2019 at 12:57 PM Steve Huston > > > <shus...@riverace.com> > > > wrote: > > > > > > > Is it possible that Spring is not finding your endpoint class? > > > > > > > > -Steve > > > > > > > > On 9/16/19, 6:55 AM, "thomas.thi...@telekom.de" < > > > thomas.thi...@telekom.de> > > > > wrote: > > > > > > > > Hi Alex, > > > > > > > > 1. I found this webpage but the links (e.g. > > > > createProducer()) goes to "page not found". > > > > > > > > 2. Stupid question: how and where to do this? > > > > > > > > -----Ursprüngliche Nachricht----- > > > > Von: Alex Dettinger <aldettin...@gmail.com> > > > > Gesendet: Montag, 16. September 2019 12:52 > > > > An: users@camel.apache.org > > > > Betreff: Re: own endpoint exmaple? > > > > > > > > Hi Thomas, > > > > > > > > This link might be of interest: > > > > > > > > https://camel.apache.org/manual/latest/writing-components.html > > > > > > > > In your case, I wonder if you missed to create the thomas > > > > component first. > > > > > > > > hth, > > > > Alex > > > > > > > > On Mon, Sep 16, 2019 at 12:44 PM <thomas.thi...@telekom.de> > wrote: > > > > > > > > > Hi, > > > > > > > > > > can some point me to a working example where an own > > > > endpoint was created. > > > > > > > > > > In route I say: > > > > > > > > > > .to("thomas://foo") > > > > > > > > > > my Endpoint is > > > > > > > > > > @Component > > > > > @UriEndpoint(scheme = "thomas", title = "Thiele", > > > > > syntax="thomas:name", label = "Thomas") public class ThomasStep > > > > > extends DefaultEndpoint {} > > > > > > > > > > But I get. > > > > > > > > > > thomas://name due to: No component found with scheme: thomas > > > > > > > > > > > > > > > > > > > > > > >