Examples of PojoExchange


Examples of org.apache.camel.component.pojo.PojoExchange

  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (!isStarted()) {
            throw new IllegalStateException("The endpoint is not active: " + getEndpoint().getEndpointUri());
        }
        PojoInvocation invocation = new PojoInvocation(proxy, method, args);
        PojoExchange exchange = getEndpoint().createExchange();
        exchange.setInvocation(invocation);
        getProcessor().process(exchange);
        Throwable fault = exchange.getException();
        if (fault != null) {
            throw new InvocationTargetException(fault);
        }
        return exchange.getOut().getBody();
  }
View Full Code Here

Examples of org.apache.camel.component.pojo.PojoExchange

    public Consumer<PojoExchange> createConsumer(Processor processor) throws Exception {     
        return new TimerConsumer(this, processor);
    }

    public PojoExchange createExchange() {
        return new PojoExchange(getContext());
    }
View Full Code Here

Examples of org.apache.camel.component.pojo.PojoExchange

  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (!isStarted()) {
            throw new IllegalStateException("The endpoint is not active: " + getEndpoint().getEndpointUri());
        }
        PojoInvocation invocation = new PojoInvocation(proxy, method, args);
        PojoExchange exchange = getEndpoint().createExchange();
        exchange.setInvocation(invocation);
        getProcessor().process(exchange);
        Throwable fault = exchange.getException();
        if (fault != null) {
            throw new InvocationTargetException(fault);
        }
        return exchange.getOut().getBody();
  }
View Full Code Here

Examples of org.apache.camel.component.pojo.PojoExchange

    super(endpoint);
    this.endpoint = endpoint;
  }

  public void process(Exchange exchange) throws AccessException, RemoteException, NotBoundException {
        PojoExchange pojoExchange = endpoint.toExchangeType(exchange);
        PojoEndpoint.invoke(getRemote(), pojoExchange);
        exchange.copyFrom(pojoExchange);
    }
View Full Code Here

Examples of org.apache.camel.component.pojo.PojoExchange

  public boolean isSingleton() {
    return false;
  }

  public PojoExchange createExchange() {
    return new PojoExchange(getContext());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.