Repository navigation
Update to the listeners() API (cloudsimplus#613) - #42
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates this project to cloudsimplus/cloudsimplus#613, where the
addOn...Listener()/removeOn...Listener()methods of the entities moved to the*Listenersviews returned bylisteners().Changes
x.addOnFooListener(l)→x.listeners().addOnFoo(l)andx.removeOnFooListener(l)→x.listeners().removeOnFoo(l), forSimulation,DatacenterBroker,Datacenter,Host,VmandCloudlet.*Listenersviews return themselves, so the 3 builder chains that ended with a listener registration (CloudletListenersExample1,CloudletListenersExample2_ResourceUsageAlongTime,VmListenersExample3_DynamicVmCreation) now register the listeners in a separate statement and return the created object.*Listenersclasses (e.g.[SimulationListeners#addOnClockTick(EventListener)]), with the import added so the links stay short.CLAUDE.mduses the new API in its example.All examples compile. The 30 changed examples run to the end without exceptions (e.g. vertical/horizontal scaling, migration, pause and the listeners examples still trigger their listeners).
Engineering principles
*Listenersviews, instead of methods spread across the entity interfaces.🤖 Generated with Claude Code