Exemple #1
0
  /**
   * 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);
  }
Exemple #2
0
  /** 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());
  }
Exemple #3
0
 @Override
 public void setEndpointUriIfNotSpecified(String value) {
   wrappedEndpoint.setEndpointUriIfNotSpecified(value);
 }
Exemple #4
0
 @Override
 public void setCamelContext(CamelContext camelContext) {
   wrappedEndpoint.setCamelContext(camelContext);
 }
Exemple #5
0
 @Override
 public boolean isSingleton() {
   return wrappedEndpoint.isSingleton();
 }
Exemple #6
0
 @Override
 public boolean isLenientProperties() {
   return wrappedEndpoint.isLenientProperties();
 }
Exemple #7
0
 @Override
 public int hashCode() {
   return wrappedEndpoint.hashCode();
 }
Exemple #8
0
 @Override
 public ExchangePattern getExchangePattern() {
   return wrappedEndpoint.getExchangePattern();
 }
Exemple #9
0
 public MinaConfiguration getConfiguration() {
   return wrappedEndpoint.getConfiguration();
 }
Exemple #10
0
 @Override
 public Component getComponent() {
   return wrappedEndpoint.getComponent();
 }
Exemple #11
0
 @Override
 public CamelContext getCamelContext() {
   return wrappedEndpoint.getCamelContext();
 }
Exemple #12
0
 @Override
 public PollingConsumer createPollingConsumer() throws Exception {
   return wrappedEndpoint.createPollingConsumer();
 }
Exemple #13
0
 @Override
 public Exchange createExchange(ExchangePattern pattern) {
   return wrappedEndpoint.createExchange(pattern);
 }
Exemple #14
0
 @Override
 public Exchange createExchange(Exchange exchange) {
   return wrappedEndpoint.createExchange(exchange);
 }
Exemple #15
0
 /* ----- dumb delegation, nothing interesting below ----- */
 @SuppressWarnings({"unchecked", "rawtypes"})
 @Override
 public void configureProperties(Map options) {
   wrappedEndpoint.configureProperties(options);
 }
Exemple #16
0
 @Override
 public void setExchangePattern(ExchangePattern exchangePattern) {
   wrappedEndpoint.setExchangePattern(exchangePattern);
 }
Exemple #17
0
 @Override
 public String toString() {
   return wrappedEndpoint.toString();
 }
Exemple #18
0
 @Override
 public String getEndpointUri() {
   return wrappedEndpoint.getEndpointUri();
 }