Skip to content

Instantly share code, notes, and snippets.

@ithayer
Created June 5, 2011 07:14
Show Gist options
  • Save ithayer/1008726 to your computer and use it in GitHub Desktop.
Save ithayer/1008726 to your computer and use it in GitHub Desktop.
[org.clojars.ithayer/plaid-penguin "1.0.0"]
...
;; 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.
...
plaid-penguin-example.core> (bean (Operation.))
{:setOp false, :setMessage false, :op nil, :message nil, :class plaid_penguin_example.Operation}
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