Work on #190: Add first batch of automagically generated puml files
This commit is contained in:
		
							
								
								
									
										50
									
								
								async-method-invocation/etc/async-method-invocation.urm.puml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								async-method-invocation/etc/async-method-invocation.urm.puml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| @startuml | ||||
| package com.iluwatar.async.method.invocation { | ||||
|   interface AsyncCallback<T> { | ||||
|     + onComplete(T, Optional<Exception>) {abstract} | ||||
|   } | ||||
|   interface AsyncResult<T> { | ||||
|     + await() {abstract} | ||||
|     + getValue() : T {abstract} | ||||
|     + isCompleted() : boolean {abstract} | ||||
|   } | ||||
|   class ThreadAsyncExecutor { | ||||
|     - idx : AtomicInteger | ||||
|     + ThreadAsyncExecutor() | ||||
|     + endProcess(asyncResult : AsyncResult<T>) : T | ||||
|     + startProcess(task : Callable<T>) : AsyncResult<T> | ||||
|     + startProcess(task : Callable<T>, callback : AsyncCallback<T>) : AsyncResult<T> | ||||
|   } | ||||
|   class App { | ||||
|     + App() | ||||
|     - callback(name : String) : AsyncCallback<T> {static} | ||||
|     - lazyval(value : T, delayMillis : long) : Callable<T> {static} | ||||
|     - log(msg : String) {static} | ||||
|     + main(args : String[]) {static} | ||||
|   } | ||||
|   -class CompletableResult<T> { | ||||
|     ~ COMPLETED : int {static} | ||||
|     ~ FAILED : int {static} | ||||
|     ~ RUNNING : int {static} | ||||
|     ~ callback : Optional<AsyncCallback<T>> | ||||
|     ~ exception : Exception | ||||
|     ~ lock : Object | ||||
|     ~ state : int | ||||
|     ~ value : T | ||||
|     ~ CompletableResult<T>(callback : AsyncCallback<T>) | ||||
|     + await() | ||||
|     + getValue() : T | ||||
|     + isCompleted() : boolean | ||||
|     ~ setException(exception : Exception) | ||||
|     ~ setValue(value : T) | ||||
|   } | ||||
|   interface AsyncExecutor { | ||||
|     + endProcess(AsyncResult<T>) : T {abstract} | ||||
|     + startProcess(Callable<T>) : AsyncResult<T> {abstract} | ||||
|     + startProcess(Callable<T>, AsyncCallback<T>) : AsyncResult<T> {abstract} | ||||
|   } | ||||
| } | ||||
| CompletableResult ..+ ThreadAsyncExecutor | ||||
| ThreadAsyncExecutor ..|> AsyncExecutor  | ||||
| CompletableResult ..|> AsyncResult  | ||||
| @enduml | ||||
		Reference in New Issue
	
	Block a user