This commit is contained in:
Marcel 2021-12-19 18:42:26 +01:00
parent 44ede54a60
commit 2d91ef6330
3 changed files with 12 additions and 9 deletions

View File

@ -50,16 +50,19 @@ public class TapasAuctionHouseApplication {
WebSubSubscriber subscriber = new WebSubSubscriber(ENVIRONMENT.getProperty("auction.house.uri"));
try {
subscriber.subscribeToAuctionHouseEndpoint(new URI("http://tapas-auction-house.86-119-34-242.nip.io/websub-discovery"));
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
for (AuctionHouseDiscoveryInformation endpoint : AuctionHouseDiscovery.getInstance().getAuctionHouseDiscoveryList()) {
System.out.println(endpoint.getWebSubUri().getValue());
subscriber.subscribeToAuctionHouseEndpoint(endpoint.getWebSubUri().getValue());
if (!endpoint.getWebSubUri().getValue().toString().equalsIgnoreCase("https://tapas-auction-house.86-119-35-40.nip.io/websub/auctions")) {
subscriber.subscribeToAuctionHouseEndpoint(endpoint.getWebSubUri().getValue());
}
}
// try {
// subscriber.subscribeToAuctionHouseEndpoint(new URI("http://6b4e-130-82-250-227.ngrok.io/websub-discovery"));
// } catch (URISyntaxException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
}
/**

View File

@ -30,7 +30,7 @@ public class AuctionHouseDiscoveryWebController {
this.auctionHouseDiscoveryUseCase = auctionHouseDiscoveryUseCase;
}
@GetMapping(path="/discovery/", consumes = AuctionHouseDiscoveryJsonRepresentation.MEDIA_TYPE)
@GetMapping(path="/discovery/"/*, consumes = AuctionHouseDiscoveryJsonRepresentation.MEDIA_TYPE */)
public ResponseEntity<String> auctionHouseDiscovery() {
List<AuctionHouseDiscoveryInformation> auctionHouseDiscoveryInformation = auctionHouseDiscoveryUseCase.auctionHouseDiscovery();

View File

@ -15,4 +15,4 @@ websub.hub.uri=https://pubsubhubbub.appspot.com
mqtt.broker.uri=tcp://broker.hivemq.com
# mqtt.broker.uri=tcp://localhost:1883
discovery.endpoint.uri=https://tapas-auction-house.86-119-34-242.nip.io
discovery.endpoint.uri=http://tapas-auction-house.86-119-34-242.nip.io