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 annotation to mark outgoing http(s) traffic (#9)
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
src/java/main/com/hlag/tools/commvis/analyzer/annotation/VisualizeHttpsCall.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,38 @@ | ||
package com.hlag.tools.commvis.analyzer.annotation; | ||
|
||
import javax.ws.rs.HttpMethod; | ||
import java.lang.annotation.*; | ||
|
||
/** | ||
* Annotated on methods to indicate that an HTTP(S) call is done. Based on this information projects communicating | ||
* with each other can be visualized. | ||
* | ||
* The destination endpoint is matched on projectId, method and path. The names of the path parameters do not have to | ||
* match. | ||
* | ||
* @see VisualizeHttpsCalls | ||
*/ | ||
@Repeatable(VisualizeHttpsCalls.class) | ||
@Target(ElementType.METHOD) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface VisualizeHttpsCall { | ||
/** | ||
* @return the method used to call path. | ||
*/ | ||
HttpMethod method(); | ||
|
||
/** | ||
* @return the path called, e.g. "/customer/{id}" | ||
*/ | ||
String path(); | ||
|
||
/** | ||
* @return the project called | ||
*/ | ||
String projectId(); | ||
|
||
/** | ||
* @return the name of the project called. Just for a better visibility in the code. The value isn't used. | ||
*/ | ||
String projectName() default ""; | ||
} |
9 changes: 9 additions & 0 deletions
9
src/java/main/com/hlag/tools/commvis/analyzer/annotation/VisualizeHttpsCalls.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,9 @@ | ||
package com.hlag.tools.commvis.analyzer.annotation; | ||
|
||
import java.lang.annotation.*; | ||
|
||
@Target(ElementType.METHOD) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface VisualizeHttpsCalls { | ||
VisualizeHttpsCall[] value(); | ||
} |
1 change: 1 addition & 0 deletions
1
src/java/main/com/hlag/tools/commvis/analyzer/service/IScannerService.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