Commit 070b16da by Adi Amir

change configuration

parent 384a7c87
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"apiList": [{ "apiList": [{
"id": "getroutes", "id": "getroutes",
"method": "GET", "method": "GET",
"uri": "getroutes", "path": "getroutes",
"QueryParams": [{ "QueryParams": [{
"key": "$config$chicago.transportation.key" "key": "$config$chicago.transportation.key"
}] }]
......
{ {
"adapters": [{ "adapters": [{
"id": "chicago.transportationn", "id": "adapter.chicago.transportation",
"instance": "CHttpAdapter:jarName", "instance": "HttpAdapter:myAdapter.jar",
"configFile": "chicago.transportation.json" "configFile": "adapter.chicago.transportation.json"
}] }]
} }
\ No newline at end of file
...@@ -7,3 +7,5 @@ log4j.prop.file.path=/logs/conf/log4j.xml ...@@ -7,3 +7,5 @@ log4j.prop.file.path=/logs/conf/log4j.xml
server.port=50040 server.port=50040
server.host=0.0.0.0 server.host=0.0.0.0
server.worker.threads=6 server.worker.threads=6
chicago.transportation.key=gT2nciTKwRv6Jy5njqm8fe7LW
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"apiId": "getroutes", "apiId": "getroutes",
"actions": [{ "actions": [{
"id": "forwardRequest", "id": "forwardRequest",
"adapterId": "chicago.transportation", "adapterId": "adapter.chicago.transportation",
"apiId": "getroutes", "apiId": "getroutes",
"Responses": [{ "Responses": [{
"code": "*", "code": "*",
......
...@@ -58,7 +58,7 @@ file(adapter api(s)): chicago.transportation.json ...@@ -58,7 +58,7 @@ file(adapter api(s)): chicago.transportation.json
Flow Flow
==== ====
http://www.ctabustracker.com/bustime/api/v1/getroutes?key=gT2nciTKwRv6Jy5njqm8fe7LW GET http://www.ctabustracker.com/bustime/api/v1/getroutes?key=gT2nciTKwRv6Jy5njqm8fe7LW
GET ../mde/{tenantId}/{serviceId}/{apiId} GET ../mde/{tenantId}/{serviceId}/{apiId}
......
package logic; package logic;
import logic.adapter.BaseAdapter;
import logic.adapter.HttpAdapter.HttpAdapter;
import microservice.io.iface.ILogger; import microservice.io.iface.ILogger;
import java.util.Map;
/** /**
* Created by eli on 6/7/16. * Created by eli on 6/7/16.
*/ */
...@@ -11,6 +15,8 @@ public class MdeManager { ...@@ -11,6 +15,8 @@ public class MdeManager {
private ILogger logger = null; private ILogger logger = null;
private int currentNumber = 0; private int currentNumber = 0;
Map<String, BaseAdapter> AdapterList = null;
public MdeManager(ILogger logger) { public MdeManager(ILogger logger) {
try{ try{
this.logger = logger; this.logger = logger;
...@@ -20,4 +26,14 @@ public class MdeManager { ...@@ -20,4 +26,14 @@ public class MdeManager {
} }
} }
public void LoadServices() {
}
public void LoadAdapters() {
HttpAdapter httpAdapter = new HttpAdapter();
AdapterList.put("aaa", httpAdapter);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment