X Tutup
Skip to content

Added additional callback methods to EventCallback#60

Merged
marcuslinke merged 1 commit intodocker-java:masterfrom
sabre1041:events-callback
Sep 23, 2014
Merged

Added additional callback methods to EventCallback#60
marcuslinke merged 1 commit intodocker-java:masterfrom
sabre1041:events-callback

Conversation

@sabre1041
Copy link
Copy Markdown
Contributor

Added additional methods and functionality for the client to have insight into the background running thread. The client previously was unaware of the status of the background thread. These methods provide visibility

@marcuslinke
Copy link
Copy Markdown
Contributor

@sabre1041 I don't think this is really needed. Exceptions should only occurs inside the event handler itself. The completion of the thread could be requested via ExecutorService.isShutdown() i guess.

@sabre1041
Copy link
Copy Markdown
Contributor Author

@marcuslinke The status of the thread unfortunately cannot be determined by querying the ExecutorService. When the thread for the particular request completes, the ExecutorService will not report a shutdown state as it will still be accepting new threads. Shutdown will only indicate that it is not accepting new threads. It can be determined by querying the ExecutorService.isTerminated(), but that would still require the client to poll the status of the thread.

Having some form of completion notification would allow the client to react on the completion of a request (report back an error or potentially initiate a new request).

@marcuslinke marcuslinke merged commit cdbd58c into docker-java:master Sep 23, 2014
@marcuslinke
Copy link
Copy Markdown
Contributor

@sabre1041 Thanks for clearing this up! Merged.

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

X Tutup