forked from usdot-jpo-ode/jpo-ode
-
Notifications
You must be signed in to change notification settings - Fork 2
Bugfix/spring upgrade #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6f0ef45
updating spring boot version to 3.5.4 and fixing kafka embedded kafka…
Michael7371 9e59c46
fixing asn1 encoded data router unit tests
Michael7371 193b766
updates to unit tests with updated spring boot version
Michael7371 eb2e378
fix error in AbstractUdpReceiverPublisher
Michael7371 9cd1efc
adding ssl bean to tests
Michael7371 a20b631
chore: checkstyle updates
Michael7371 9514d35
reverting ssl config
Michael7371 b2a83c7
reverting formatting changes
Michael7371 d9c8887
reverting formatting changes to the asn1encodeddatarouter
Michael7371 600c3be
reverting changes to application.yml
Michael7371 af5fcbe
removal of redundant start check in embedded kafka getter
Michael7371 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,4 +75,4 @@ private Map<String, Object> getKafkaConsumerProperties() { | |
| } | ||
| return props; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 35 additions & 29 deletions
64
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/udp/AbstractUdpReceiverPublisher.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,55 @@ | ||
| package us.dot.its.jpo.ode.udp; | ||
|
|
||
| import lombok.extern.slf4j.Slf4j; | ||
|
|
||
| import java.net.DatagramSocket; | ||
| import java.net.SocketException; | ||
| import lombok.extern.slf4j.Slf4j; | ||
|
|
||
| /** | ||
| * Abstract base class for UDP receiver publishers that handle incoming UDP messages. Provides | ||
| * common functionality for creating and managing UDP sockets. | ||
| */ | ||
| @Slf4j | ||
| public abstract class AbstractUdpReceiverPublisher implements Runnable { | ||
|
|
||
| public class UdpReceiverException extends Exception { | ||
| private static final long serialVersionUID = 1L; | ||
| /** | ||
| * Exception thrown when there is an error in UDP receiver operations. | ||
| */ | ||
| public class UdpReceiverException extends Exception { | ||
| private static final long serialVersionUID = 1L; | ||
|
|
||
| public UdpReceiverException(String string, Exception e) { | ||
| super(string, e); | ||
| } | ||
| public UdpReceiverException(String string, Exception e) { | ||
| super(string, e); | ||
| } | ||
| } | ||
|
|
||
| protected DatagramSocket socket; | ||
| protected DatagramSocket socket; | ||
|
|
||
| protected String senderIp; | ||
| protected int senderPort; | ||
| protected String senderIp; | ||
| protected int senderPort; | ||
|
|
||
| protected int port; | ||
| protected int bufferSize; | ||
| protected int port; | ||
| protected int bufferSize; | ||
|
|
||
| private boolean stopped = false; | ||
| private boolean stopped = false; | ||
|
|
||
| public boolean isStopped() { | ||
| return stopped; | ||
| } | ||
| public boolean isStopped() { | ||
| return stopped; | ||
| } | ||
|
|
||
| public void setStopped(boolean stopped) { | ||
| this.stopped = stopped; | ||
| } | ||
| public void setStopped(boolean stopped) { | ||
| this.stopped = stopped; | ||
| } | ||
|
|
||
| protected AbstractUdpReceiverPublisher(int port, int bufferSize) { | ||
| this.port = port; | ||
| this.bufferSize = bufferSize; | ||
| protected AbstractUdpReceiverPublisher(int port, int bufferSize) { | ||
| this.port = port; | ||
| this.bufferSize = bufferSize; | ||
|
|
||
| try { | ||
| this.socket = new DatagramSocket(this.port); | ||
| log.info("Created UDP socket bound to port {}", this.port); | ||
| } catch (SocketException e) { | ||
| log.error("Error creating socket with port {}", this.port, e); | ||
| } | ||
| try { | ||
| this.socket = new DatagramSocket(this.port); | ||
| log.info("Created UDP socket bound to port {}", this.port); | ||
| } catch (SocketException e) { | ||
| log.error("Error creating socket with port {}", this.port, e); | ||
| } | ||
| } | ||
|
|
||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,4 +148,4 @@ management: | |
| enabled: true | ||
| metrics: | ||
| tags: | ||
| enabled: true | ||
| enabled: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,4 +95,4 @@ void testAsn1DecodedDataRouter_MAPDataFlow() throws IOException { | |
| } | ||
| consumer.close(); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,4 +93,4 @@ void testProcess_ApprovalTest() throws IOException { | |
| } | ||
| testConsumer.close(); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.