Skip to content

Commit

Permalink
Merge pull request #61 from vinscom/develop
Browse files Browse the repository at this point in the history
dev-to-master
  • Loading branch information
vinscom authored Jan 15, 2019
2 parents 7ea8374 + ec3edad commit 9df8aa2
Show file tree
Hide file tree
Showing 22 changed files with 477 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
securityEnable=false
services+=\
/in/erail/service/BroadcastService,\
/in/erail/service/BinaryBodyService
/in/erail/service/BinaryBodyService,\
/in/erail/service/ProcessorCheckService


119 changes: 69 additions & 50 deletions config-layers/test/in/erail/route/openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,26 @@
"summary": "Send message to all subscriber of topicName",
"description": "Send message to all subscriber of topicName",
"operationId": "API_V1_BROADCAST_SERVICE",
"parameters": [{
"name": "topicName",
"in": "path",
"required": true,
"schema": {
"type": "string"
"parameters": [
{
"name": "topicName",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
}],
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/broadcastMessage"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success Response",
Expand All @@ -30,41 +42,45 @@
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/broadcastMessage"
}
}
},
"required": true
}
},
"parameters": [{
"name": "topicName",
"in": "path",
"description": "Name of topic on which to broadcast message",
"required": true,
"schema": {
"type": "string"
"parameters": [
{
"name": "topicName",
"in": "path",
"description": "Name of topic on which to broadcast message",
"required": true,
"schema": {
"type": "string"
}
}
}]
]
},
"/broadcastv2/{topicName}": {
"post": {
"summary": "Send message to all subscriber of topicName",
"description": "Send message to all subscriber of topicName",
"operationId": "API_V1_BROADCAST_V2_SERVICE",
"parameters": [{
"name": "topicName",
"in": "path",
"required": true,
"schema": {
"type": "string"
"parameters": [
{
"name": "topicName",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
}],
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/broadcastMessage"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success Response",
Expand All @@ -76,27 +92,30 @@
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/broadcastMessage"
}
}
},
"required": true
}
},
"parameters": [{
"name": "topicName",
"in": "path",
"description": "Name of topic on which to broadcast message",
"required": true,
"schema": {
"type": "string"
"parameters": [
{
"name": "topicName",
"in": "path",
"description": "Name of topic on which to broadcast message",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"/processcheck": {
"get": {
"summary": "Check Processor",
"operationId": "API_V1_PROCESSOR_CHECK",
"responses": {
"200": {
"description": "Success"
}
}
}]
}
}
},
"components": {
Expand Down
7 changes: 7 additions & 0 deletions config-layers/test/in/erail/service/BaseService.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#/in/erail/service/BaseService

vertx=/io/vertx/core/Vertx
enable=true
log=true
preProcessProcessors=/in/erail/service/processor/LoadSubjectProcessor1
postProcessProcessors=/in/erail/service/processor/AddHeaderProcessor1
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#/in/erail/service/BinaryBodyService
$class=in.erail.service.BinaryBodyService
$basedOn=/in/erail/service/BaseService

operationId=API_V1_BROADCAST_V2_SERVICE
serviceUniqueId=API_V1_BROADCAST_V2_SERVICE
vertx=/io/vertx/core/Vertx
enable=true
log=true
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#/in/erail/service/BroadcastService
$class=in.erail.service.BroadcastService
$basedOn=/in/erail/service/BaseService

operationId=API_V1_BROADCAST_SERVICE
serviceUniqueId=API_V1_BROADCAST_SERVICE
vertx=/io/vertx/core/Vertx
enable=true
log=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#/in/erail/service/ProcessorCheckService
$class=in.erail.service.ProcessorCheckService
$basedOn=/in/erail/service/BaseService

operationId=API_V1_PROCESSOR_CHECK
serviceUniqueId=API_V1_PROCESSOR_CHECK
preProcessProcessors+=/in/erail/service/processor/LoadSubjectProcessor2
postProcessProcessors+=/in/erail/service/processor/AddHeaderProcessor2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/in/erail/service/processor/AddHeaderProcessor1
$class=in.erail.service.processor.AddHeaderProcessor
message=Header1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/in/erail/service/processor/AddHeaderProcessor2
$class=in.erail.service.processor.AddHeaderProcessor
message=Header2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/in/erail/service/processor/LoadSubjectProcessor1
$class=in.erail.service.processor.LoadSubjectProcessor
message=Subject1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/in/erail/service/processor/LoadSubjectProcessor2
$class=in.erail.service.processor.LoadSubjectProcessor
message=Subject2
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>in.erail</groupId>
<artifactId>api-framework</artifactId>
<version>2.4.3</version>
<version>2.4.4</version>
<packaging>jar</packaging>
<developers>
<developer>
Expand Down Expand Up @@ -57,6 +57,12 @@
<goals>
<goal>jar</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
39 changes: 39 additions & 0 deletions src/main/java/in/erail/model/Event.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package in.erail.model;

/**
*
* @author vinay
*/
public class Event {

private RequestEvent request;
private ResponseEvent response;

public Event() {
this(new RequestEvent(), new ResponseEvent());
}

public Event(RequestEvent pRequest, ResponseEvent pResponse) {
this.request = pRequest;
this.response = pResponse;
}

public RequestEvent getRequest() {
return request;
}

public Event setRequest(RequestEvent pRequest) {
this.request = pRequest;
return this;
}

public ResponseEvent getResponse() {
return response;
}

public Event setResponse(ResponseEvent pResponse) {
this.response = pResponse;
return this;
}

}
Loading

0 comments on commit 9df8aa2

Please sign in to comment.