Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery
/
mde
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
070b16da
authored
Jun 15, 2016
by
Adi Amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
change configuration
parent
384a7c87
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
6 deletions
cfg/adapter.chicago.transportation.json
cfg/adapters.json
cfg/config.properties
cfg/services.chicago.transportation.json
doc/mde-service-flow.txt
src/main/java/logic/MdeManager.java
cfg/adapter.chicago.transportation.json
View file @
070b16da
...
...
@@ -4,7 +4,7 @@
"apiList"
:
[{
"id"
:
"getroutes"
,
"method"
:
"GET"
,
"
uri
"
:
"getroutes"
,
"
path
"
:
"getroutes"
,
"QueryParams"
:
[{
"key"
:
"$config$chicago.transportation.key"
}]
...
...
cfg/adapters.json
View file @
070b16da
{
"adapters"
:
[{
"id"
:
"
chicago.transportation
n"
,
"instance"
:
"
CHttpAdapter:jarName
"
,
"configFile"
:
"chicago.transportation.json"
"id"
:
"
adapter.chicago.transportatio
n"
,
"instance"
:
"
HttpAdapter:myAdapter.jar
"
,
"configFile"
:
"
adapter.
chicago.transportation.json"
}]
}
\ No newline at end of file
cfg/config.properties
View file @
070b16da
...
...
@@ -7,3 +7,5 @@ log4j.prop.file.path=/logs/conf/log4j.xml
server.port
=
50040
server.host
=
0.0.0.0
server.worker.threads
=
6
chicago.transportation.key
=
gT2nciTKwRv6Jy5njqm8fe7LW
\ No newline at end of file
cfg/services.chicago.transportation.json
View file @
070b16da
...
...
@@ -3,7 +3,7 @@
"apiId"
:
"getroutes"
,
"actions"
:
[{
"id"
:
"forwardRequest"
,
"adapterId"
:
"chicago.transportation"
,
"adapterId"
:
"
adapter.
chicago.transportation"
,
"apiId"
:
"getroutes"
,
"Responses"
:
[{
"code"
:
"*"
,
...
...
doc/mde-service-flow.txt
View file @
070b16da
...
...
@@ -58,7 +58,7 @@ file(adapter api(s)): chicago.transportation.json
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}
...
...
src/main/java/logic/MdeManager.java
View file @
070b16da
package
logic
;
import
logic.adapter.BaseAdapter
;
import
logic.adapter.HttpAdapter.HttpAdapter
;
import
microservice.io.iface.ILogger
;
import
java.util.Map
;
/**
* Created by eli on 6/7/16.
*/
...
...
@@ -11,6 +15,8 @@ public class MdeManager {
private
ILogger
logger
=
null
;
private
int
currentNumber
=
0
;
Map
<
String
,
BaseAdapter
>
AdapterList
=
null
;
public
MdeManager
(
ILogger
logger
)
{
try
{
this
.
logger
=
logger
;
...
...
@@ -20,4 +26,14 @@ public class MdeManager {
}
}
public
void
LoadServices
()
{
}
public
void
LoadAdapters
()
{
HttpAdapter
httpAdapter
=
new
HttpAdapter
();
AdapterList
.
put
(
"aaa"
,
httpAdapter
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment