Skip to content

Commit

Permalink
Revert "Added WebSocketBase Implementation"
Browse files Browse the repository at this point in the history
This reverts commit db7c7db.
  • Loading branch information
glascaleia committed Oct 26, 2021
1 parent 9465f8e commit 6096d8e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.messaging.simp.stomp.StompCommand;
import org.springframework.messaging.simp.stomp.StompHeaders;
import org.springframework.messaging.simp.stomp.StompSession;
Expand All @@ -302,7 +301,7 @@
/**
* @author Francesco Izzi @ CNR IMAA geoSDI
*/
@Profile(value = "stomp")

@Component(value = "dpcSessionHandler")
public class DPCRadarDataStompSessionHandler extends StompSessionHandlerAdapter implements InitializingBean {

Expand All @@ -312,7 +311,7 @@ public class DPCRadarDataStompSessionHandler extends StompSessionHandlerAdapter
public String productToDownload;
@Value("${defaultSavePath}")
public String defaultSavePath;
private final String DOWNLOAD_PRODUCT_URL = "https://radar-api.protezionecivile.it/wide/product/downloadProduct";
private final String DOWNLOAD_PRODUCT_URL = "https://radar.protezionecivile.gov.it/wide-api/wide/product/downloadProduct";
private StompClient stompClient;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,14 @@
*/
package gov.protezionecivile.radar.downloader;

import java.util.Date;

/**
* @author Francesco Izzi @ CNR IMAA geoSDI
*/

public class DPCWebsocketMessage {

private String productType;
private Date time;
private String time;
private String period;

public String getProductType() {
Expand All @@ -296,11 +294,11 @@ public void setProductType(String productType) {
this.productType = productType;
}

public Date getTime() {
public String getTime() {
return time;
}

public void setTime(Date time) {
public void setTime(String time) {
this.time = time;
}

Expand All @@ -316,7 +314,7 @@ public String toJsonString(){

return "{" +
"\"productType\":"+"\"" + getProductType() +"\"," +
"\"productDate\":"+ getTime().getTime() +
"\"productDate\":"+ getTime() +
"}";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Profile;
import org.springframework.messaging.converter.MappingJackson2MessageConverter;
import org.springframework.messaging.simp.stomp.StompSession;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
Expand All @@ -296,13 +295,13 @@
/**
* @author Francesco Izzi @ CNR IMAA geoSDI
*/
@Profile(value = "stomp")

@Component
public class StompClient {

private static final Logger logger = LogManager.getLogger(StompClient.class);
//
protected static String RADAR_WEBSOCKET_URL = "wss://8ielgrmwo6.execute-api.eu-south-1.amazonaws.com/Prod";
private static String RADAR_WEBSOCKET_URL = "wss://radar.protezionecivile.gov.it/wide-websocket";

@Autowired
@Qualifier(value = "dpcSessionHandler")
Expand Down
5 changes: 2 additions & 3 deletions java/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
productToDownload=HRD,LTG,SRI,SRT3,VMI,SRT1,IR108
defaultSavePath=/Users/glascaleia/Desktop/DATI_RADAR/
spring.profiles.active=without_stomp
productToDownload = HRD,LTG
defaultSavePath = /Users/francescoizzi/Desktop/DATI_RADAR/

0 comments on commit 6096d8e

Please sign in to comment.