485486487488489490491492
Component component = context.getComponent(); if (exchange.getRole() == Role.PROVIDER) { return new ConsumerComponentEndpointFilter(component); } else { return new ProducerComponentEndpointFilter(component); } }