Skip to content

Instantly share code, notes, and snippets.

@antoniogarrote
Created October 17, 2010 19:54
Show Gist options
  • Save antoniogarrote/631202 to your computer and use it in GitHub Desktop.
Save antoniogarrote/631202 to your computer and use it in GitHub Desktop.
Jobim server
;; Server protocol
(defprotocol Server
(init [this initial-value] "Invoked when the server starts execution")
(handle-call [this request from state] "Invoked when a new synchronous request arrives at the server")
(handle-cast [this request state] "Invoked when a new asynchronous request arrives at the server")
(handle-info [this request state] "Handles messages distinct to events")
(terminate [this state] "Clean up code invoked when the server is going to be terminated externally"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment