Skip to content
Browse files

added protocol mod

  • Loading branch information...
1 parent 8377608 commit caa47ae23847759a086a4f2166851b1809d9a999 @leonlee committed
View
3 protocol/build.gradle
@@ -0,0 +1,3 @@
+dependencies {
+ compile 'org.msgpack:msgpack:0.6.7'
+}
View
1 protocol/gradle.properties
@@ -0,0 +1 @@
+modulename=org.riderzen.ogs.protocol
View
28 protocol/src/main/groovy/org/riderzen/ogs/protocol/ProtocolParser.groovy
@@ -0,0 +1,28 @@
+package org.riderzen.ogs.protocol
+
+import org.vertx.groovy.core.parsetools.RecordParser
+import org.vertx.java.busmods.BusModBase
+
+/**
+ * User: Leon Lee <mail.lgq@gmail.com>
+ * Created On: 12-12-11
+ */
+class ProtocolParser extends BusModBase {
+ String address;
+ RecordParser parser;
+
+ @Override
+ void start() {
+ super.start()
+
+ init()
+ }
+
+ def init() {
+ address = getOptionalStringConfig("address", "org.riderzen.ogs.protocol")
+ eb.registerHandler(address) { message ->
+ logger.debug("received message $message")
+
+ }
+ }
+}
View
2 settings.gradle
@@ -1 +1 @@
-include 'bootstrap', 'tcp-server'
+include 'bootstrap', 'tcp-server', 'protocol'

0 comments on commit caa47ae

Please sign in to comment.
Something went wrong with that request. Please try again.