Class ServiceChainMethodLevelService
java.lang.Object
edu.university.ecs.lab.detection.antipatterns.services.ServiceChainMethodLevelService
Service class for detecting and managing service chains in a network graph.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
protected static final int
Length of the chain to consider an anti-pattern.private MethodDependencyGraph
-
Constructor Summary
ConstructorDescriptionConstructs the service with a default chain length of 3.ServiceChainMethodLevelService
(int CHAIN_LENGTH) Constructs the service with a specified chain length. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Depth-first search (DFS) to explore and detect service chains starting from currentNode.Retrieves all service chains from the given network graph.
-
Field Details
-
DEFAULT_CHAIN_LENGTH
protected static final int DEFAULT_CHAIN_LENGTHLength of the chain to consider an anti-pattern.- See Also:
-
CHAIN_LENGTH
private final int CHAIN_LENGTH -
visited
-
allChains
-
graph
-
currentPath
-
-
Constructor Details
-
ServiceChainMethodLevelService
public ServiceChainMethodLevelService()Constructs the service with a default chain length of 3. -
ServiceChainMethodLevelService
public ServiceChainMethodLevelService(int CHAIN_LENGTH) Constructs the service with a specified chain length.- Parameters:
CHAIN_LENGTH
- the length of the chain to consider an anti-pattern
-
-
Method Details
-
getServiceChains
Retrieves all service chains from the given network graph.- Parameters:
graph
- the network graph to analyze- Returns:
- a ServiceChain object representing all detected service chains
-
dfs
Depth-first search (DFS) to explore and detect service chains starting from currentNode.- Parameters:
currentNode
- the current node being visited
-