Commit c04428c8 authored by Roland Schuller's avatar Roland Schuller
Browse files

Finished Guarantor - > Test

parent ee27c1c7
......@@ -60,7 +60,7 @@ public abstract class MessageQueueEndpoint<T> extends RestEndpoint {
}
private void signal(MessageRequest<T> message, boolean processing, boolean finished) {
LoadBalancedRestClient lbrc = loadBalancer.RestClient("/loadbalancer/guarantor/status", RestClient.REST_METHOD.POST);
LoadBalancedRestClient lbrc = loadBalancer.RestClient("/loadbalancer/guarantor/state", RestClient.REST_METHOD.POST);
lbrc.setJson(new MessageStatus(finished, processing, message.getMessageid()));
for (String guarantorid : message.getGuarantorServiceIds()) {
lbrc.toDistinctServiceFireAndForget(guarantorid, false);
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package at.itopen.simplerest.microservice.message;
import at.itopen.simplerest.conversion.Conversion;
import at.itopen.simplerest.microservice.loadbalancer.Service;
import at.itopen.simplerest.path.RestPath;
/**
*
* @author roland
*/
public class ServiceIpPath extends RestPath {
public ServiceIpPath(String pathName) {
super(pathName);
}
@Override
protected boolean checkPath(Conversion conversion) {
String sourceIP = conversion.getRequest().getSourceIp().toString();
for (Service service : getRootPath().getRestHttpServer().getLoadBalancer().getServices().getAllServices()) {
if (sourceIP.equals(service.getInfo().getNet_ip())) {
return true;
}
}
return false;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment