/** * Wraps the original starting point of the consumer route into a set of PIX/PDQ-specific * interceptors. * * @param originalProcessor The original consumer processor. */ @Override public Consumer createConsumer(Processor originalProcessor) throws Exception { if (sslContext != null) { DefaultIoFilterChainBuilder filterChain = wrappedEndpoint.getAcceptorConfig().getFilterChain(); if (!filterChain.contains("ssl")) { HandshakeCallbackSSLFilter filter = new HandshakeCallbackSSLFilter(sslContext); filter.setNeedClientAuth(clientAuthType == ClientAuthType.MUST); filter.setWantClientAuth(clientAuthType == ClientAuthType.WANT); filter.setHandshakeExceptionCallback(new HandshakeFailureCallback()); filter.setEnabledProtocols(sslProtocols); filter.setEnabledCipherSuites(sslCiphers); filterChain.addFirst("ssl", filter); } } // configure interceptor chain List<Hl7v2Interceptor> chain = getConsumerInterceptorChain(); Processor processor = originalProcessor; for (int i = chain.size() - 1; i >= 0; --i) { Hl7v2Interceptor interceptor = chain.get(i); interceptor.setConfigurationHolder(this); interceptor.setWrappedProcessor(processor); processor = interceptor; } return wrappedEndpoint.createConsumer(processor); }
/** Wraps the original camel-mina producer into a set of PIX/PDQ-specific ones. */ @Override public Producer createProducer() throws Exception { if (sslContext != null) { DefaultIoFilterChainBuilder filterChain = wrappedEndpoint.getConnectorConfig().getFilterChain(); if (!filterChain.contains("ssl")) { HandshakeCallbackSSLFilter filter = new HandshakeCallbackSSLFilter(sslContext); filter.setUseClientMode(true); filter.setHandshakeExceptionCallback(new HandshakeFailureCallback()); filter.setEnabledProtocols(sslProtocols); filter.setEnabledCipherSuites(sslCiphers); filterChain.addFirst("ssl", filter); } } return Hl7v2InterceptorUtils.adaptProducerChain( getProducerInterceptorChain(), this, wrappedEndpoint.createProducer()); }
@Override public void setEndpointUriIfNotSpecified(String value) { wrappedEndpoint.setEndpointUriIfNotSpecified(value); }
@Override public void setCamelContext(CamelContext camelContext) { wrappedEndpoint.setCamelContext(camelContext); }
@Override public boolean isSingleton() { return wrappedEndpoint.isSingleton(); }
@Override public boolean isLenientProperties() { return wrappedEndpoint.isLenientProperties(); }
@Override public int hashCode() { return wrappedEndpoint.hashCode(); }
@Override public ExchangePattern getExchangePattern() { return wrappedEndpoint.getExchangePattern(); }
public MinaConfiguration getConfiguration() { return wrappedEndpoint.getConfiguration(); }
@Override public Component getComponent() { return wrappedEndpoint.getComponent(); }
@Override public CamelContext getCamelContext() { return wrappedEndpoint.getCamelContext(); }
@Override public PollingConsumer createPollingConsumer() throws Exception { return wrappedEndpoint.createPollingConsumer(); }
@Override public Exchange createExchange(ExchangePattern pattern) { return wrappedEndpoint.createExchange(pattern); }
@Override public Exchange createExchange(Exchange exchange) { return wrappedEndpoint.createExchange(exchange); }
/* ----- dumb delegation, nothing interesting below ----- */ @SuppressWarnings({"unchecked", "rawtypes"}) @Override public void configureProperties(Map options) { wrappedEndpoint.configureProperties(options); }
@Override public void setExchangePattern(ExchangePattern exchangePattern) { wrappedEndpoint.setExchangePattern(exchangePattern); }
@Override public String toString() { return wrappedEndpoint.toString(); }
@Override public String getEndpointUri() { return wrappedEndpoint.getEndpointUri(); }