Skip to content
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

Create Dynamic Proxy Chain #2621

Closed
wants to merge 3 commits into from
Closed

Conversation

pankajMor152
Copy link

@pankajMor152 pankajMor152 commented Oct 8, 2023

Title: Implement Dynamic Proxy Chain Pattern for Logging
Pull Request Description:
This pull request introduces the implementation of the Dynamic Proxy Chain Pattern for logging method invocations in a Java application. It addresses issue #1.

Main Changes:
1; Added ProxyHandler interface to define before and after method invocation behavior.
2; Created the DynamicProxyChain class to manage dynamic proxy chains and handle method invocations.
3; Added a static method in DynamicProxyChain for creating proxy instances.
4; Implemented a sample use case with a MyService class and a LoggingHandler for method call logging.

Additional Information:
1; This implementation serves as a basic example of the Dynamic Proxy Chain Pattern for logging. It can be extended and
customized to add more complex cross-cutting concerns.
2; Developers can use this pattern to separate concerns and improve code maintainability in various scenarios.
3; Please review and provide feedback on the code structure and usage.
4; Further enhancements and customizations can be made based on specific project requirements.

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@iluwatar
Copy link
Owner

Looks like proxy pattern. We already have an example in the library. Also, please check https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

@iluwatar iluwatar closed this Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants