* @return the EndpointFilter
*/
protected EndpointFilter createEndpointFilter(ComponentContextImpl context, MessageExchangeImpl exchange) {
Component component = context.getComponent();
if (exchange.getRole() == Role.PROVIDER) {
return new ConsumerComponentEndpointFilter(component);
}
else {
return new ProducerComponentEndpointFilter(component);
}
}