Examples of DefaultProducer


Examples of org.apache.camel.impl.DefaultProducer

        final Object pojo = getPojo();
        if (pojo == null) {
            throw new NoPojoAvailableException(this);
        }

        return new DefaultProducer(this) {
            public void process(Exchange exchange) {
                PojoExchange pojoExchange = toExchangeType(exchange);
                invoke(pojo, pojoExchange);
                exchange.copyFrom(pojoExchange);
            }
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

        }
        return exchanges;
    }

    public Producer createProducer() throws Exception {
        return new DefaultProducer(this) {
            public void process(Exchange exchange) throws Exception {
                onExchange(exchange);
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

                }
            });
        }

        public Producer createProducer() throws Exception {
            return new DefaultProducer(this) {
                public void process(final Exchange exchange) throws Exception {
                    executor.execute(new Runnable() {
                        public void run() {
                            try {
                                tradeExecutor.execute(ExchangeHelper.getMandatoryInBody(exchange, Message.class));
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

            setCamelContext(camelContext);
        }

        @Override
        public Producer createProducer() throws Exception {
            return new DefaultProducer(this) {
                @Override
                public void process(Exchange exchange) throws Exception {
                    throw new IllegalArgumentException("Forced");
                }
            };
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

    public Consumer createConsumer(Processor processor) throws Exception {
        throw new UnsupportedOperationException();
    }

    public Producer createProducer() throws Exception {
        return new DefaultProducer(this) {
            public void process(Exchange exchange) throws Exception {
                SimpleResolver resolver = new SimpleResolver();
                int type = Type.TXT;
                Name name = Name.fromString(String.valueOf(exchange.getIn().getHeader(DnsConstants.TERM)) + ".wp.dg.cx", Name.root);
                Record rec = Record.newRecord(name, type, DClass.IN);
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

    public DnsIpEndpoint(Component component) {
        super("dns://ip", component);
    }

    public Producer createProducer() throws Exception {
        return new DefaultProducer(this) {

            public void process(Exchange exchange) throws Exception {
                String domain = exchange.getIn().getHeader(DnsConstants.DNS_DOMAIN, String.class);
                ObjectHelper.notEmpty(domain, "Header " + DnsConstants.DNS_DOMAIN);
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

    public Consumer createConsumer(Processor arg0) throws Exception {
        throw new UnsupportedOperationException();
    }

    public Producer createProducer() throws Exception {
        return new DefaultProducer(this) {
            public void process(Exchange exchange) throws Exception {
                String server = exchange.getIn().getHeader(DnsConstants.DNS_SERVER, String.class);
                ObjectHelper.notEmpty(server, "Header " + DnsConstants.DNS_SERVER);

                SimpleResolver resolver = new SimpleResolver(server);
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

        return true;
    }

    public Producer createProducer() throws Exception {
        ObjectHelper.notNull(applicationContext, "applicationContext");
        return new DefaultProducer(this) {
            public void process(Exchange exchange) throws Exception {
                ApplicationEvent event = toApplicationEvent(exchange);
                applicationContext.publishEvent(event);
            }
        };
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

    public Consumer createConsumer(Processor processor) throws Exception {
        throw new UnsupportedOperationException();
    }

    public Producer createProducer() throws Exception {
        return new DefaultProducer(this) {
            public void process(Exchange exchange) throws Exception {
                String dnsName = exchange.getIn().getHeader(DnsConstants.DNS_NAME, String.class);
                ObjectHelper.notEmpty(dnsName, "Header " + DnsConstants.DNS_NAME);

                Object type = exchange.getIn().getHeader(DnsConstants.DNS_TYPE);
View Full Code Here

Examples of org.apache.camel.impl.DefaultProducer

                }
            });
        }

        public Producer createProducer() throws Exception {
            return new DefaultProducer(this) {
                public void process(final Exchange exchange) throws Exception {
                    executor.execute(new Runnable() {
                        public void run() {
                            try {
                                tradeExecutor.execute(exchange.getIn().getMandatoryBody(Message.class));
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.