Skip to content

Commit ec773ed

Browse files
fil512Ken Stevens
andauthored
update broker api (#6804)
* first steps * moving channel classes out of subscription * initial rough-out done * adding some legacy tests * jpa subscription tests partially passing * fix test regression * fix test regression * fix test regressions * fix compile issues fix test regressions * rename legacy to spring messaging * spotless * hapi-fhir compiles * fix test regression * spotless * first pass at ActiveMq * fix test regressions * spotless * fix test regression * add message type to listener and consumer and fix test regression * spotless * spotless * compile * fix test regression * EmbeddedActiveMqBrokerTest WIP * compiling * compiling * compiling * compiling * compiling * distinguish between getMessageType() and getPayloadType() * clean up Spring Messaging wrapper * clean up Spring Messaging wrapper * fix intermittent * compiling * hapi compile * compiling * FIXME * FIXMEs * moar FIXMEs * jetbrains * try new approach: dual interface implementation * try new approach: dual interface implementation * fix message type validation * CdrKafkaListenerTest passes, but at what cost...? * fix test * spotless * fix test regression * gitignore * license * fix regression * cleanup * working on ChannelImportR4NoRetriableExceptionsDefinedIT * merge master * fixme * fix Camel Broker regression. That one was a doozy! * spotless * CamelBrokerKafkaIT passes. What a tangled mess! * fix regression * fix regression * port 7000 * FIXME * FIXME * FIXME * FIXME * FIXME move TestMessageListener * FIXME CdrKafkaListenerTest * fix test regression * checkstyle * initial refactoring * fix tests * introduce IHasPayloadMessageKey to consolidate code * introduce IHasPayloadMessageKey to consolidate code * spotless * fix test * Greatly simplified KafkaSender classes * javadoc * javadoc * javadoc * javadoc * cleanup * move retrying logic out of the consumer and into the listener * fix test * poms * javadoc * javadoc * remove ICdrChannelConsumer * consistent application of exception * brains... * remove ICdrChannelProducer * fix test * fix mock test * fix test regression * licenses * final cdr review * bump version * final review cleanup * cleanup and organize imports * final review * spotless * FIXME * bump pom * fix merge gunk * rename RawMessage to RawStringMessage * rename RawMessage to RawStringMessage * merge master, bump version * rename test message listener * review feedback * review feedback * review feedback * spitless --------- Co-authored-by: Ken Stevens <[email protected]>
1 parent 6f5cc63 commit ec773ed

File tree

226 files changed

+3367
-1688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+3367
-1688
lines changed

hapi-deployable-pom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>8.3.0-SNAPSHOT</version>
8+
<version>8.3.2-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-android/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-deployable-pom</artifactId>
8-
<version>8.3.0-SNAPSHOT</version>
8+
<version>8.3.2-SNAPSHOT</version>
99

1010
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1111
</parent>

hapi-fhir-base/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-deployable-pom</artifactId>
8-
<version>8.3.0-SNAPSHOT</version>
8+
<version>8.3.2-SNAPSHOT</version>
99

1010
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1111
</parent>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package ca.uhn.fhir.util;
2+
3+
/*-
4+
* #%L
5+
* Smile CDR - CDR
6+
* %%
7+
* Copyright (C) 2016 - 2025 Smile CDR, Inc.
8+
* %%
9+
* All rights reserved.
10+
* #L%
11+
*/
12+
13+
import org.slf4j.Logger;
14+
15+
import java.util.Optional;
16+
17+
public class IoUtils {
18+
19+
private IoUtils() {}
20+
21+
/**
22+
* Replacement for the deprecated commons-lang method of the same name. Use sparingly
23+
* since they are right that most uses of this should be replaced with try-with-resources
24+
*/
25+
public static void closeQuietly(final AutoCloseable theCloseable) {
26+
closeQuietly(theCloseable, null);
27+
}
28+
/**
29+
* Closes quietly logging exceptions if any
30+
*
31+
* @param theCloseable Closeable instance to be closed
32+
* @param theLog Logger to log a potential exception
33+
*/
34+
public static void closeQuietly(AutoCloseable theCloseable, Logger theLog) {
35+
try {
36+
if (theCloseable != null) {
37+
theCloseable.close();
38+
}
39+
} catch (Throwable tx) {
40+
if (theLog != null) {
41+
theLog.warn("Unable to close {}", theCloseable, tx);
42+
}
43+
}
44+
}
45+
46+
/**
47+
* Cast the object to the target class, returning an empty optional if it fails.
48+
*/
49+
public static <T> Optional<T> safeCast(Object theObject, Class<T> theTargetClass) {
50+
if (theTargetClass.isInstance(theObject)) {
51+
return Optional.of(theTargetClass.cast(theObject));
52+
}
53+
return Optional.empty();
54+
}
55+
}

hapi-fhir-bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-fhir-bom</artifactId>
7-
<version>8.3.0-SNAPSHOT</version>
7+
<version>8.3.2-SNAPSHOT</version>
88

99
<packaging>pom</packaging>
1010
<name>HAPI FHIR BOM</name>
1111

1212
<parent>
1313
<groupId>ca.uhn.hapi.fhir</groupId>
1414
<artifactId>hapi-deployable-pom</artifactId>
15-
<version>8.3.0-SNAPSHOT</version>
15+
<version>8.3.2-SNAPSHOT</version>
1616

1717
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1818
</parent>

hapi-fhir-checkstyle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>8.3.0-SNAPSHOT</version>
8+
<version>8.3.2-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-cli/hapi-fhir-cli-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-deployable-pom</artifactId>
7-
<version>8.3.0-SNAPSHOT</version>
7+
<version>8.3.2-SNAPSHOT</version>
88

99
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
1010
</parent>

hapi-fhir-cli/hapi-fhir-cli-app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>ca.uhn.hapi.fhir</groupId>
88
<artifactId>hapi-fhir-cli</artifactId>
9-
<version>8.3.0-SNAPSHOT</version>
9+
<version>8.3.2-SNAPSHOT</version>
1010

1111
<relativePath>../pom.xml</relativePath>
1212
</parent>

hapi-fhir-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>ca.uhn.hapi.fhir</groupId>
77
<artifactId>hapi-fhir</artifactId>
8-
<version>8.3.0-SNAPSHOT</version>
8+
<version>8.3.2-SNAPSHOT</version>
99

1010
<relativePath>../pom.xml</relativePath>
1111
</parent>

hapi-fhir-client-apache-http5/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>ca.uhn.hapi.fhir</groupId>
66
<artifactId>hapi-deployable-pom</artifactId>
7-
<version>8.3.0-SNAPSHOT</version>
7+
<version>8.3.2-SNAPSHOT</version>
88

99
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
1010
</parent>

0 commit comments

Comments
 (0)