-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fabio Esposito
committed
Aug 18, 2017
1 parent
89d471a
commit 68f11af
Showing
11 changed files
with
153 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ include 'survey-write' | |
include 'survey-api' | ||
include 'survey-common' | ||
include 'survey-api' | ||
include 'survey-events' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
apply plugin: 'application' | ||
|
||
dependencies { | ||
compile project(":survey-common") | ||
} | ||
|
||
shadowJar { | ||
classifier = 'fat' | ||
mainClassName = 'com.surveygorilla.api.MainApi' | ||
|
||
/*manifest { | ||
attributes 'Main-Verticle': 'com.surveygorilla.api.SurveyApiVerticle' | ||
}*/ | ||
mergeServiceFiles { | ||
include 'META-INF/survey-api/io.vertx.core.spi.VerticleFactory' | ||
} | ||
} | ||
|
||
build.dependsOn(shadowJar) |
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
18 changes: 18 additions & 0 deletions
18
survey-events/src/main/java/com/surveygorilla/event/MainEvent.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.surveygorilla.event; | ||
|
||
import io.vertx.core.Vertx; | ||
import io.vertx.core.VertxOptions; | ||
|
||
/** | ||
* Created by fabio.pires on 18.08.17. | ||
*/ | ||
public class MainEvent { | ||
public static void main(String[] args) { | ||
Vertx.clusteredVertx(new VertxOptions().setClustered(true), cluster -> { | ||
if (cluster.succeeded()) { | ||
final Vertx vertx = cluster.result(); | ||
vertx.deployVerticle(SurveyEventVerticle.class.getName()); | ||
} | ||
}); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
survey-events/src/main/java/com/surveygorilla/event/SurveyEventVerticle.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.surveygorilla.event; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Future; | ||
import io.vertx.core.logging.Logger; | ||
import io.vertx.core.logging.LoggerFactory; | ||
|
||
/** | ||
* Created by fabio.pires on 18.08.17. | ||
*/ | ||
public class SurveyEventVerticle extends AbstractVerticle { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
||
@Override | ||
public void start(Future<Void> start) throws Exception { | ||
logger.info("SurveyEventVerticle started"); | ||
vertx.eventBus().addInterceptor(message -> { | ||
logger.info("NEW EVENT:", message.message().body()); | ||
}); | ||
|
||
start.complete(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
apply plugin: 'application' | ||
|
||
dependencies { | ||
compile project(":survey-common") | ||
} | ||
|
||
shadowJar { | ||
classifier = 'fat' | ||
mainClassName = 'com.surveygorilla.read.MainRead' | ||
/* | ||
manifest { | ||
Attributes 'Main-Verticle': 'com.surveygorilla.read.SurveyReadVerticle' | ||
} | ||
*/ | ||
mergeServiceFiles { | ||
include 'META-INF/survey-api/io.vertx.core.spi.VerticleFactory' | ||
} | ||
} | ||
|
||
build.dependsOn(shadowJar) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
apply plugin: 'application' | ||
|
||
dependencies { | ||
compile project(":survey-common") | ||
} | ||
|
||
shadowJar { | ||
classifier = 'fat' | ||
mainClassName = 'com.surveygorilla.write.MainWrite' | ||
|
||
/*manifest { | ||
Attributes 'Main-Verticle': 'com.surveygorilla.write.SurveyWriteVerticle' | ||
}*/ | ||
mergeServiceFiles { | ||
include 'META-INF/survey-api/io.vertx.core.spi.VerticleFactory' | ||
} | ||
} | ||
|
||
build.dependsOn(shadowJar) |
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