java-design-patterns/business-delegate/etc/business-delegate.urm.puml

46 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2019-12-07 18:03:49 +02:00
@startuml
package com.iluwatar.business.delegate {
class App {
+ App()
+ main(args : String[]) {static}
}
class BusinessDelegate {
- lookupService : BusinessLookup
+ BusinessDelegate()
+ playbackMovie(movie : String)
+ setLookupService(lookupService : BusinessLookup)
2019-12-07 18:03:49 +02:00
}
class BusinessLookup {
- netflixService : NetflixService
- youTubeService : YouTubeService
2019-12-07 18:03:49 +02:00
+ BusinessLookup()
+ getBusinessService(movie : String) : VideoStreamingService
+ setNetflixService(netflixService : NetflixService)
+ setYouTubeService(youTubeService : YouTubeService)
2019-12-07 18:03:49 +02:00
}
class MobileClient {
2019-12-07 18:03:49 +02:00
- businessDelegate : BusinessDelegate
+ MobileClient(businessDelegate : BusinessDelegate)
+ playbackMovie(movie : String)
2019-12-07 18:03:49 +02:00
}
class NetflixService {
2019-12-07 18:03:49 +02:00
- LOGGER : Logger {static}
+ NetflixService()
2019-12-07 18:03:49 +02:00
+ doProcessing()
}
interface VideoStreamingService {
+ doProcessing() {abstract}
}
class YouTubeService {
2019-12-07 18:03:49 +02:00
- LOGGER : Logger {static}
+ YouTubeService()
2019-12-07 18:03:49 +02:00
+ doProcessing()
}
}
BusinessLookup --> "-netflixService" NetflixService
BusinessLookup --> "-youTubeService" YouTubeService
MobileClient --> "-businessDelegate" BusinessDelegate
2019-12-07 18:03:49 +02:00
BusinessDelegate --> "-lookupService" BusinessLookup
NetflixService ..|> VideoStreamingService
YouTubeService ..|> VideoStreamingService
2019-12-07 18:03:49 +02:00
@enduml