Created
June 5, 2011 07:14
-
-
Save ithayer/1008726 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[org.clojars.ithayer/plaid-penguin "1.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
;; Subclass the handler. | |
(def *processor* | |
(OpService$Processor. | |
(proxy [OpService$Iface] [] | |
(do_op [op] ;; This is the only interface function for the 'OpService' service. | |
(lg/info (str "server got: " op)) | |
Result/OK)))) ;; It just returns OK. | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plaid-penguin-example.core> (bean (Operation.)) | |
{:setOp false, :setMessage false, :op nil, :message nil, :class plaid_penguin_example.Operation} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace java plaid_penguin_example | |
enum OpType { | |
SLEEP = 1 | |
} | |
struct Operation { | |
1: OpType op, | |
2: string message | |
} | |
enum Result { | |
OK = 1, | |
BAD = 2 | |
} | |
service OpService { | |
Result do_op(1:Operation op) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment