|
6 years ago | |
---|---|---|
bridge | 6 years ago | |
.gitignore | 6 years ago | |
Readme.md | 6 years ago | |
application.dat | 6 years ago |
여러개의 플랫폼 연동 서비스를 제공하기 위한 이벤트 수신 및 전달 전용 브릿지
application.dat
파일이 존재해야 합니다.이 프로젝트는 Maven 혹은 gradle 프로젝트가 아니기 때문에 dependency를 등록할 수 가 없습니다. buildpath를 통해 라이브러리를 등록하세요.
이벤트명 | 이벤트 설명 |
---|---|
msg_device_event | 디바이스의 상태 변경 이벤트 |
msg_home_devices_status_event | 디바이스 상태 주기보고 이벤트 |
msg_ararm_event | 방범 알림 이벤트 (외출, 재중 |
msg_visitor_event | 방문자 알림 이벤트 |
msg_notice_event | 공지사항 알림 이벤트 |
msg_car_inout_event | 입차 알림 이벤트 |
msg_box_event | 택배 알림 이벤트 |
msg_energy_event | 에너지 검침 이벤트 |
unsubscription | 월패드 구독 해지 이벤트 |
서비스명 | Event 포트 |
---|---|
Kakao | 2222 |
2223 | |
kt | 2224 |
UPLUS | 2225 |
LGE | 2226 |
SAMSUNG | 2227 |
AMAZON | 2228 |
APPLE | 2229 |
/service/bridge
에 export한 bridge.jar
파일과 application.dat
파일을 업로드 합니다.서비스를 등록합니다.
$ cd /etc/systemd/system
$ sudo vi bridge.service
[Unit]
Description=Event Bridge
[Service]
Type=simple
User=valley
ExecStart=/usr/bin/java -jar /service/bridge/bridge.jar
WorkingDirectory=/service
[Install]
WantedBy=multi-user.target
서비스 데몬을 새로고침 합니다.
$ sudo systemctl daemon-reload
sh
$ sudo systemctl start bridge.service
COMMON_INFO.java
에 정의된 경로에 존재해야 합니다. public static final String LINUX_PROPERTIES_DIR = "/service/bridge/application.dat";
public static final String WINDOWS_PROPERTIES_DIR = "D:\\temp\\bridge_jar\\application.dat";
sh
{
"name" : "uplus",
"address" : "10.0.1.1",
"port": 2225,
"events" : [
"msg_device_event",
"msg_ararm_event",
"msg_visitor_event",
"msg_notice_event",
"msg_car_inout_event",
"msg_box_event",
"unsubscription"
]
}
- 각 Field 정보
| Field 명 | Type | Description |
| ------ | ------ | ------ |
| name | String | 플랫폼 명 |
| address | String | IP Address |
| port | Integer | 이벤트 수신 용 Port |
| events | list of String | 수신받을 이벤트 목록 |