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-direct/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
> >     >
> >
> >
> >
>

Reply via email to