Package org.apache.camel

Examples of org.apache.camel.Endpoint


        log.debug("Created routes: " + routes);

        assertEquals("Number routes created", 1, routes.size());
        for (Route route : routes) {
            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "seda:a", key.getEndpointUri());
            Processor processor = getProcessorWithoutErrorHandler(route);

            Splitter p1 = assertIsInstanceOf(Splitter.class, processor);
        }
    }
View Full Code Here


        log.debug("Created routes: " + routes);

        assertEquals("Number routes created", 1, routes.size());
        for (Route route : routes) {
            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "seda:a", key.getEndpointUri());
            Processor processor = getProcessorWithoutErrorHandler(route);

            IdempotentConsumer idempotentConsumer = assertIsInstanceOf(IdempotentConsumer.class, processor);

            assertEquals("messageIdExpression", "header(myMessageId)", idempotentConsumer
View Full Code Here

        // END SNIPPET: route

        camelContext.start();

        // START SNIPPET: invoke
        Endpoint endpoint = camelContext.getEndpoint("direct:hello");
        ISay proxy = ProxyHelper.createProxy(endpoint, ISay.class);
        String rc = proxy.say();
        assertEquals("Good Bye!", rc);
        // END SNIPPET: invoke
View Full Code Here

    return route;
  }

  @ManagedAttribute(description = "Route Endpoint Uri")
  public String getEndpointUri() {
    Endpoint ep = route.getEndpoint();
    return ep != null ? ep.getEndpointUri() : VALUE_UNKNOWN;
  }
View Full Code Here

   * @param mbean
   * @return generated ObjectName
   * @throws MalformedObjectNameException
   */
  public ObjectName getObjectName(ManagedEndpoint mbean) throws MalformedObjectNameException {
    Endpoint ep = mbean.getEndpoint();
    Hashtable<String, String> keys = new Hashtable<String, String>();
    keys.put(KEY_CONTEXT, getContextId(ep.getContext()));
    keys.put(KEY_TYPE, TYPE_ENDPOINTS);
    keys.put(KEY_ENDPOINT, getEndpointId(ep));
    return new ObjectName(domainName, keys);
  }
View Full Code Here

   * @return generated ObjectName
   * @throws MalformedObjectNameException
   */
  public ObjectName getObjectName(ManagedRoute mbean) throws MalformedObjectNameException {
    Hashtable<String, String> keys = new Hashtable<String, String>();
    Endpoint ep = mbean.getRoute().getEndpoint();
    String ctxid = ep != null ? getContextId(ep.getContext()) : VALUE_UNKNOWN;
    keys.put(KEY_CONTEXT, ctxid);
    keys.put(KEY_TYPE, TYPE_ROUTES);
    keys.put(KEY_ENDPOINT, getEndpointId(ep));
    return new ObjectName(domainName, keys);
  }
View Full Code Here

        printRoutes(writer, context.getRoutes());
    }

    protected void printRoutes(PrintWriter writer, List<Route> routes) {
        for (Route r : routes) {
            Endpoint end = r.getEndpoint();
            writer.print(end.getEndpointUri());
            writer.print(" -> ");
            writer.print(r);
            writer.print(" -> ");
            if (r instanceof EventDrivenConsumerRoute) {
                EventDrivenConsumerRoute consumerRoute = (EventDrivenConsumerRoute)r;
View Full Code Here

        return "Aggregator[ " + getExpression() + " -> " + getOutputs() + "]";
    }

    @Override
    public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception {
        Endpoint from = routeContext.getEndpoint();
        final Processor processor = routeContext.createProcessor(this);
        final Aggregator service = new Aggregator(from, processor, getExpression()
            .createExpression(routeContext), aggregationStrategy);

        Route route = new Route<Exchange>(from, service) {
View Full Code Here

    /**
     * Resolves an endpoint from either a URI or a named reference
     */
    public Endpoint resolveEndpoint(String uri, String ref) {
        Endpoint endpoint = null;
        if (uri != null) {
            endpoint = resolveEndpoint(uri);
            if (endpoint == null) {
                throw new NoSuchEndpointException(uri);
            }
View Full Code Here

     * @param uri
     * @return
     */
    public static Endpoint getMandatoryEndpoint(CamelContext camelContext, String uri)
        throws NoSuchEndpointException {
        Endpoint endpoint = camelContext.getEndpoint(uri);
        if (endpoint == null) {
            throw new NoSuchEndpointException(uri);
        } else {
            return endpoint;
        }
View Full Code Here

TOP

Related Classes of org.apache.camel.Endpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.