Skip to content

Commit

Permalink
added protocol mod
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlee committed Dec 13, 2012
1 parent 8377608 commit caa47ae
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions protocol/build.gradle
@@ -0,0 +1,3 @@
dependencies {
compile 'org.msgpack:msgpack:0.6.7'
}
1 change: 1 addition & 0 deletions protocol/gradle.properties
@@ -0,0 +1 @@
modulename=org.riderzen.ogs.protocol
@@ -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")

}
}
}
2 changes: 1 addition & 1 deletion settings.gradle
@@ -1 +1 @@
include 'bootstrap', 'tcp-server'
include 'bootstrap', 'tcp-server', 'protocol'

0 comments on commit caa47ae

Please sign in to comment.