Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SimpleRest
Commits
c04428c8
Commit
c04428c8
authored
Mar 15, 2019
by
Roland Schuller
Browse files
Finished Guarantor - > Test
parent
ee27c1c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/at/itopen/simplerest/microservice/message/MessageQueueEndpoint.java
View file @
c04428c8
...
...
@@ -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/stat
us
"
,
RestClient
.
REST_METHOD
.
POST
);
LoadBalancedRestClient
lbrc
=
loadBalancer
.
RestClient
(
"/loadbalancer/guarantor/stat
e
"
,
RestClient
.
REST_METHOD
.
POST
);
lbrc
.
setJson
(
new
MessageStatus
(
finished
,
processing
,
message
.
getMessageid
()));
for
(
String
guarantorid
:
message
.
getGuarantorServiceIds
())
{
lbrc
.
toDistinctServiceFireAndForget
(
guarantorid
,
false
);
...
...
src/main/java/at/itopen/simplerest/microservice/message/ServiceIpPath.java
0 → 100644
View file @
c04428c8
/*
* 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
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment