Package jline.examples.java.basic
Class LayeredVisualizationExample
java.lang.Object
jline.examples.java.basic.LayeredVisualizationExample
Demonstrates JUNG visualization of LayeredNetwork models using the plot() method.
This example creates layered queueing network models and displays them using the built-in plot() method. The visualization showcases the structure of complex multi-tier software architectures.
The visualization uses shape coding:
- Red pyramids: Processors/Hosts
- Red parallelograms: Tasks
- Red rectangles: Entries
- Red circles: Activities
Edge styles indicate relationship types (all edges are black):
- Solid lines: Parent-child containment, entry-to-activity binding, activity precedence
- Dashed lines: Synchronous calls
- Dot-dashed lines: Asynchronous calls
- Dotted lines: Forwarding calls
The window includes menus for switching layouts and mouse modes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LayeredNetworkCreates a simple model demonstrating forwarding calls.static voidMain method demonstrating the plot() method on LayeredNetwork.
-
Constructor Details
-
LayeredVisualizationExample
public LayeredVisualizationExample()
-
-
Method Details
-
createForwardingExample
Creates a simple model demonstrating forwarding calls.In this model:
- Client calls Server1
- Server1 forwards the reply to Server2 (50% probability)
- Server2 sends the reply back to Client
- Returns:
- LayeredNetwork with forwarding calls
-
main
Main method demonstrating the plot() method on LayeredNetwork.- Parameters:
args- command line arguments (not used)- Throws:
Exception- if model creation fails
-