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()
|
2021-03-22 08:34:56 +02:00
|
|
|
+ playbackMovie(movie : String)
|
|
|
|
+ setLookupService(lookupService : BusinessLookup)
|
2019-12-07 18:03:49 +02:00
|
|
|
}
|
|
|
|
class BusinessLookup {
|
2021-03-22 08:34:56 +02:00
|
|
|
- netflixService : NetflixService
|
|
|
|
- youTubeService : YouTubeService
|
2019-12-07 18:03:49 +02:00
|
|
|
+ BusinessLookup()
|
2021-03-22 08:34:56 +02:00
|
|
|
+ getBusinessService(movie : String) : VideoStreamingService
|
|
|
|
+ setNetflixService(netflixService : NetflixService)
|
|
|
|
+ setYouTubeService(youTubeService : YouTubeService)
|
2019-12-07 18:03:49 +02:00
|
|
|
}
|
2021-03-22 08:34:56 +02:00
|
|
|
class MobileClient {
|
2019-12-07 18:03:49 +02:00
|
|
|
- businessDelegate : BusinessDelegate
|
2021-03-22 08:34:56 +02:00
|
|
|
+ MobileClient(businessDelegate : BusinessDelegate)
|
|
|
|
+ playbackMovie(movie : String)
|
2019-12-07 18:03:49 +02:00
|
|
|
}
|
2021-03-22 08:34:56 +02:00
|
|
|
class NetflixService {
|
2019-12-07 18:03:49 +02:00
|
|
|
- LOGGER : Logger {static}
|
2021-03-22 08:34:56 +02:00
|
|
|
+ NetflixService()
|
2019-12-07 18:03:49 +02:00
|
|
|
+ doProcessing()
|
|
|
|
}
|
2021-03-22 08:34:56 +02:00
|
|
|
interface VideoStreamingService {
|
|
|
|
+ doProcessing() {abstract}
|
|
|
|
}
|
|
|
|
class YouTubeService {
|
2019-12-07 18:03:49 +02:00
|
|
|
- LOGGER : Logger {static}
|
2021-03-22 08:34:56 +02:00
|
|
|
+ YouTubeService()
|
2019-12-07 18:03:49 +02:00
|
|
|
+ doProcessing()
|
|
|
|
}
|
|
|
|
}
|
2021-03-22 08:34:56 +02:00
|
|
|
BusinessLookup --> "-netflixService" NetflixService
|
|
|
|
BusinessLookup --> "-youTubeService" YouTubeService
|
|
|
|
MobileClient --> "-businessDelegate" BusinessDelegate
|
2019-12-07 18:03:49 +02:00
|
|
|
BusinessDelegate --> "-lookupService" BusinessLookup
|
2021-03-22 08:34:56 +02:00
|
|
|
NetflixService ..|> VideoStreamingService
|
|
|
|
YouTubeService ..|> VideoStreamingService
|
2019-12-07 18:03:49 +02:00
|
|
|
@enduml
|