Class AbstractWsEndpoint<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>>

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsEndpoint<AuditDatasetType,ConfigType>
All Implemented Interfaces:
AutoCloseable, CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId, StatefulService, SuspendableService, AuditableEndpoint<AuditDatasetType>
Direct Known Subclasses:
Hl7v3AsyncResponseEndpoint, Hl7v3Endpoint, HpdEndpoint, SimpleHl7v2WsEndpoint, Xacml20Endpoint, XdsAsyncResponseEndpoint, XdsEndpoint

@ManagedResource(description="Managed IPF eHealth Web Service Endpoint") public abstract class AbstractWsEndpoint<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>> extends org.apache.camel.support.DefaultEndpoint implements AuditableEndpoint<AuditDatasetType>
Camel endpoint used to create producers and consumers based on webservice calls.
Author:
Jens Riemschneider, Dmytro Rud
  • Field Details

    • WSA_REPLYTO_HEADER_NAME

      public static final String WSA_REPLYTO_HEADER_NAME
      Name of incoming Camel header where the user should store the URL of asynchronous response endpoint (WS-Addressing header "ReplyTo").
    • CORRELATION_KEY_HEADER_NAME

      public static final String CORRELATION_KEY_HEADER_NAME
      Name of Camel message header where the user should store the optional correlation key.
    • INCOMING_HTTP_HEADERS

      public static final String INCOMING_HTTP_HEADERS
      Name of Camel message header where incoming HTTP headers will be stored as a Map<String, String>.
    • OUTGOING_HTTP_HEADERS

      public static final String OUTGOING_HTTP_HEADERS
      Name of Camel message header from where additional user-defined HTTP headers will be taken as a Map<String, String>.
    • INCOMING_SOAP_HEADERS

      public static final String INCOMING_SOAP_HEADERS
      Name of Camel message header where incoming SOAP headers will be stored as a Map<QName, Header>.
    • OUTGOING_SOAP_HEADERS

      public static final String OUTGOING_SOAP_HEADERS
      Name of Camel message header from where additional user-defined HTTP headers will be taken as a List<Header> or Map<QName, Header>.
  • Constructor Details

  • Method Details

    • getServiceInstance

      public AbstractWebService getServiceInstance()
      Constructs and returns a transaction-specific service class instance for the given endpoint.
      Returns:
      service class instance for the given endpoint.
    • getCustomServiceInstance

      protected AbstractWebService getCustomServiceInstance(AbstractWsEndpoint<AuditDatasetType,ConfigType> endpoint)
      Returns a new instance of a service class. Overwrite this method if a simple call to Class.newInstance() is not sufficient.
      Parameters:
      endpoint - this endpoint as paramater
      Returns:
      service class instance
    • getClientAuditStrategy

      public AuditStrategy<AuditDatasetType> getClientAuditStrategy()
      Description copied from interface: AuditableEndpoint
      Returns client-side audit strategy instance.
      Specified by:
      getClientAuditStrategy in interface AuditableEndpoint<AuditDatasetType extends WsAuditDataset>
      Returns:
      client-side audit strategy instance
    • getServerAuditStrategy

      public AuditStrategy<AuditDatasetType> getServerAuditStrategy()
      Description copied from interface: AuditableEndpoint
      Returns server-side audit strategy instance.
      Specified by:
      getServerAuditStrategy in interface AuditableEndpoint<AuditDatasetType extends WsAuditDataset>
      Returns:
      server-side audit strategy instance
    • isSingleton

      @ManagedAttribute public boolean isSingleton()
      Specified by:
      isSingleton in interface IsSingleton
      Overrides:
      isSingleton in class org.apache.camel.support.DefaultEndpoint
    • getServiceUrl

      public String getServiceUrl()
      Returns the URL of the service.

      The URL is derived from the endpoint URI defined in the constructor. If the URI does not represent a producer, this method throws an exception.

      Returns:
      the service URL.
    • getServiceAddress

      @ManagedAttribute(description="Service Address") public String getServiceAddress()
      Returns the address of the service.

      The address is derived from the endpoint URI defined in the constructor. If the URI does not represent a consumer, this method throws an exception.

      Returns:
      the service address.
    • isAudit

      @ManagedAttribute(description="Audit Enabled") public boolean isAudit()
      Specified by:
      isAudit in interface AuditableEndpoint<AuditDatasetType extends WsAuditDataset>
      Returns:
      true if auditing is turned on. true by default.
    • getAuditContext

      public AuditContext getAuditContext()
      Specified by:
      getAuditContext in interface AuditableEndpoint<AuditDatasetType extends WsAuditDataset>
      Returns:
      audit context to be used for this endpoint
    • setAuditContext

      public void setAuditContext(AuditContext auditContext)
    • isSecure

      @ManagedAttribute(description="Security Enabled") public boolean isSecure()
      Returns:
      true if https should be used instead of http. Defaults to false.
    • setSecure

      public void setSecure(boolean secure)
      Parameters:
      secure - true if https should be used instead of http.
    • getUsername

      public String getUsername()
    • setUsername

      @ManagedAttribute(description="Basic Authentication Username") public void setUsername(String username)
    • getPassword

      @ManagedAttribute(description="Basic Authentication Password") public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getSslContextParameters

      public SSLContextParameters getSslContextParameters()
    • setSslContextParameters

      public void setSslContextParameters(SSLContextParameters sslContextParameters)
    • getHostnameVerifier

      public HostnameVerifier getHostnameVerifier()
    • setHostnameVerifier

      public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
    • setCorrelator

      public void setCorrelator(AsynchronyCorrelator<AuditDatasetType> correlator)
      Configures the asynchrony correlator for this endpoint.
    • getCorrelator

      public AsynchronyCorrelator<AuditDatasetType> getCorrelator()
      Returns the correlator.
    • getCustomCxfInterceptors

      public InterceptorProvider getCustomCxfInterceptors()
      Returns custom interceptors configured for this endpoint.
    • getCustomInterceptors

      @Deprecated public InterceptorProvider getCustomInterceptors()
      Returns custom interceptors configured for this endpoint.
    • getHomeCommunityId

      @ManagedAttribute(description="HomeCommunityId") public String getHomeCommunityId()
      Returns:
      homeCommunityId of this endpoint.
    • setHomeCommunityId

      public void setHomeCommunityId(String homeCommunityId)
      Configures homeCommunityId for this endpoint.
      Parameters:
      homeCommunityId - homeCommunityId in format "urn:oid:1.2.3.4.5".
    • setHomeCommunityId

      public void setHomeCommunityId(URN urn)
      Configures homeCommunityId for this endpoint.
      Parameters:
      urn - homeCommunityId in format "urn:oid:1.2.3.4.5".
    • getRejectionHandlingStrategy

      public WsRejectionHandlingStrategy getRejectionHandlingStrategy()
      Returns:
      rejection handling strategy, if any configured.
    • setRejectionHandlingStrategy

      public void setRejectionHandlingStrategy(WsRejectionHandlingStrategy rejectionHandlingStrategy)
      Parameters:
      rejectionHandlingStrategy - a rejection handling strategy instance.
    • getFeatures

      public List<AbstractFeature> getFeatures()
      Returns:
      CXF features configured for this endpoint.
    • getSchemaLocations

      public List<String> getSchemaLocations()
      Returns:
      CXF schema locations configured for this endpoint.
    • getProperties

      public Map<String,Object> getProperties()
      Returns:
      CXF schema locations configured for this endpoint.
    • setHttpClientPolicy

      public void setHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy)
    • getHttpClientPolicy

      public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getHttpClientPolicy()
    • getComponent

      Overrides:
      getComponent in class org.apache.camel.support.DefaultEndpoint
    • getJaxWsClientFactory

      public abstract JaxWsClientFactory<AuditDatasetType> getJaxWsClientFactory()
      Returns:
      JAX-WS client object factory.
    • getJaxWsServiceFactory

      public abstract JaxWsServiceFactory<AuditDatasetType> getJaxWsServiceFactory()
      Returns:
      JAX-WS service object factory.
    • createConsumer

      public Consumer createConsumer(Processor processor)
      Specified by:
      createConsumer in interface Endpoint
    • createProducer

      public Producer createProducer()
      Specified by:
      createProducer in interface Endpoint
    • getProducer

      Constructs and returns a transaction-specific Camel producer instance
      Parameters:
      clientFactory - JAX-WS client factory instance.
      Returns:
      Camel producer instance.
      Since:
      3.1
    • isAddressing

      @ManagedAttribute(description="Addressing Enabled") public boolean isAddressing()
      Returns:
      true if WS-Addressing enabled.
    • isMtom

      @ManagedAttribute(description="Mtom Enabled") public boolean isMtom()
      Returns:
      true if MTOM enabled.
    • isSwaOutSupport

      @ManagedAttribute(description="SOAP With Attachments Output Enabled") public boolean isSwaOutSupport()
      Returns:
      true if SOAP With Attachments Output enabled.
    • getSecurityInformation

      public WsSecurityInformation getSecurityInformation()