Skip to content

Commit

Permalink
Merge pull request #284 from pahnjy/develop
Browse files Browse the repository at this point in the history
SI Server IP변경 #283
  • Loading branch information
pahnjy authored Nov 30, 2016
2 parents 427052d + 12576d9 commit ec4bf1c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String deviceExecute(String deviceId,String deviceCommand, String session
}

// Device 제어 요청 보냄.
ResultMessage resultMessage = deviceControlProxy.deviceControlRequest(ClientProfile.SI_DEV_CONTOL_URI,deviceControlMessage);
ResultMessage resultMessage = deviceControlProxy.deviceControlRequest(ClientProfile.SI_CONTOL_URI,deviceControlMessage);
logger.debug(LogPrint.LogMethodNamePrint() + " | Device Control Result : " + " , Device Uri = " + device.getDeviceUri() + " , Result : " + resultMessage + " , Session ID = " + sessionId);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public String deviceSubscriptionRequest(String deviceUri) {
// DeviceLogic에 생성되거나 제어되면 서브스크립트 걸어야 겠군.
// 현제 정책이 안되어 있어서. 등록되면 걸지.. 제어시 걸지는 고려 필요.

String responseData = clientService.requestPostServiceReceiveString(ClientProfile.SI_DEV_SUBSCRIPTION_URI, requestBody);
String responseData = clientService.requestPostServiceReceiveString(ClientProfile.SI_SUBSCRIPTION_URI, requestBody);
// ResponseData{ "code" : "2000", "message" : "", "content" : "" }
logger.debug(LogPrint.LogMethodNamePrint() + " | Subscription Request : Response Data = " + responseData);
ResultMessage resultMessage = new ResultMessage();
Expand Down Expand Up @@ -92,7 +92,7 @@ public String deviceSubscriptionReleaseRequest(String deviceUri) {
// DeviceLogic에 생성되거나 제어되면 서브스크립트 걸어야 겠군.
// 현제 정책이 안되어 있어서. 등록되면 걸지.. 제어시 걸지는 고려 필요.

String responseData = clientService.requestPostServiceReceiveString(ClientProfile.SI_DEV_SUBSCRIPTION_RELEASE_URI, requestBody);
String responseData = clientService.requestPostServiceReceiveString(ClientProfile.SI_SUBSCRIPTION_RELEASE_URI, requestBody);
logger.debug(LogPrint.LogMethodNamePrint() + " | Device SubscriptionRelease Request Result = " + responseData);
logger.info("<================ Device SubscriptionRelease Request End ================>");
return responseData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.Test;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
Expand Down Expand Up @@ -48,4 +49,13 @@ public void name() throws Exception {
Date currentTime = calendar.getTime();
System.out.println(currentTime);
}

@Test
public void dbTime(){
String time = "583bc66ecf8b437a86b83375";
String hexTime = time.substring(0,8);
long date = Long.parseLong(hexTime,16);
System.out.println(new SimpleDateFormat("yyyy-mm-dd HH-mm:ss").format(new Date(date*1000)));
}

}

0 comments on commit ec4bf1c

Please sign in to comment.