1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.platform.camel.ihe.hl7v3;
17
18 import org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3AsyncResponseServiceFactory;
19 import org.openehealth.ipf.commons.ihe.hl7v3.audit.Hl7v3AuditDataset;
20 import org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3DeferredResponderFactory;
21 import org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3WsTransactionConfiguration;
22 import org.openehealth.ipf.commons.ihe.ws.JaxWsClientFactory;
23 import org.openehealth.ipf.commons.ihe.ws.JaxWsServiceFactory;
24 import org.openehealth.ipf.commons.ihe.ws.WsInteractionId;
25 import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWebService;
26 import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsComponent;
27 import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsEndpoint;
28 import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsProducer;
29
30 import java.util.Map;
31
32
33
34
35
36
37 public class Hl7v3AsyncResponseEndpoint<ConfigType extends Hl7v3WsTransactionConfiguration>
38 extends AbstractWsEndpoint<Hl7v3AuditDataset, ConfigType> {
39
40 public Hl7v3AsyncResponseEndpoint(
41 String endpointUri,
42 String address,
43 AbstractWsComponent<Hl7v3AuditDataset, ConfigType, ? extends WsInteractionId<ConfigType>> component,
44 Map<String, Object> parameters,
45 Class<? extends AbstractWebService> serviceClass) {
46 super(endpointUri, address, component, parameters, serviceClass);
47 }
48
49
50 @Override
51 public JaxWsClientFactory<Hl7v3AuditDataset> getJaxWsClientFactory() {
52 return new Hl7v3DeferredResponderFactory(
53 getComponent().getWsTransactionConfiguration(),
54 getServiceUrl(),
55 isAudit() ? getComponent().getServerAuditStrategy() : null,
56 getAuditContext(),
57 getCustomInterceptors(),
58 getFeatures(),
59 getProperties());
60 }
61
62
63 @Override
64 public JaxWsServiceFactory<Hl7v3AuditDataset> getJaxWsServiceFactory() {
65 return new Hl7v3AsyncResponseServiceFactory(
66 getComponent().getWsTransactionConfiguration(),
67 getServiceAddress(),
68 isAudit() ? getComponent().getServerAuditStrategy() : null,
69 getAuditContext(),
70 getCorrelator(),
71 getCustomInterceptors());
72 }
73
74 @Override
75 public AbstractWsProducer<Hl7v3AuditDataset, ConfigType, ?, ?> getProducer(AbstractWsEndpoint<Hl7v3AuditDataset, ConfigType> endpoint,
76 JaxWsClientFactory<Hl7v3AuditDataset> clientFactory) {
77 throw new IllegalStateException("No producer support for asynchronous response endpoints");
78 }
79 }