This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add identifier to all endpoints (#19)
- Loading branch information
Showing
5 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/com/hlag/tools/commvis/analyzer/model/EndpointFactory.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.hlag.tools.commvis.analyzer.model; | ||
|
||
public class EndpointFactory { | ||
private static final EndpointFactory singleton = new EndpointFactory(); | ||
private Long numberGenerator = 0L; | ||
|
||
public static EndpointFactory get() { | ||
return singleton; | ||
} | ||
|
||
private synchronized Long getNewIdNumber() { | ||
return ++numberGenerator; | ||
} | ||
|
||
public HttpConsumer createHttpConsumer(String className, String methodName, String type, String path) { | ||
return new HttpConsumer(className, methodName, type, path, getNewIdNumber()); | ||
} | ||
|
||
public HttpProducer createHttpProducer(String className, String methodName, String type, String path, String destinationProjectId) { | ||
return new HttpProducer(className, methodName, type, path, destinationProjectId, getNewIdNumber()); | ||
} | ||
|
||
public JmsReceiver createJmsReceiver(String className, String destinationType, String destination) { | ||
return new JmsReceiver(className, destinationType, destination, getNewIdNumber()); | ||
} | ||
} |
This file contains 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
16 changes: 10 additions & 6 deletions
16
src/main/java/com/hlag/tools/commvis/analyzer/model/HttpProducer.java
This file contains 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 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
20 changes: 9 additions & 11 deletions
20
src/main/java/com/hlag/tools/commvis/analyzer/model/JmsReceiver.java
This file contains 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