Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
ff7add53
Commit
ff7add53
authored
Oct 04, 2017
by
afreyssin
Browse files
Handling correlationIDAsBytes from Rest message.
Termination enhancements.
parent
3722f7ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
View file @
ff7add53
...
...
@@ -196,7 +196,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
// Initializes Rest client and target
try
{
//
TODO (AF):
It seems that there is no exceptions thrown by these methods.
// It seems that there is no exceptions thrown by these methods.
client
=
ClientBuilder
.
newClient
(
new
ClientConfig
()
// TODO (AF): Fix these properties with configuration values
.
property
(
ClientProperties
.
CONNECT_TIMEOUT
,
connectTimeout
)
...
...
@@ -479,10 +479,9 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
}
if
(
header
.
containsKey
(
"CorrelationIDAsBytes"
))
{
// TODO
"CorrelationIDAsBytes"
msg
.
setJMSCorrelationIDAsBytes
((
byte
[])
header
.
get
(
"CorrelationIDAsBytes"
));
if
(
logger
.
isLoggable
(
BasicLevel
.
WARN
))
logger
.
log
(
BasicLevel
.
WARN
,
"RESTAcquisitionAsync.setJMSMessageHeader -- TODO CorrelationIDAsBytes"
);
logger
.
log
(
BasicLevel
.
DEBUG
,
"-- CorrelationIDAsBytes = "
+
header
.
get
(
"CorrelationIDAsBytes"
));
}
// TODO (AF): Is it correct? The destination should correspond to the current destination.
...
...
@@ -745,8 +744,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
try
{
Response
response
=
client
.
target
(
uriCloseConsumer
).
request
().
accept
(
MediaType
.
TEXT_PLAIN
).
delete
();
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
// TODO (AF): remove stacktrace
logger
.
log
(
BasicLevel
.
DEBUG
,
"RestDistribution.closeConsumer(): -> "
+
response
.
getStatus
(),
new
Exception
());
logger
.
log
(
BasicLevel
.
DEBUG
,
"RestDistribution.closeConsumer(): -> "
+
response
.
getStatus
());
}
catch
(
Exception
exc
)
{
logger
.
log
(
BasicLevel
.
ERROR
,
"RestDistribution.closeConsumer()"
,
exc
);
return
;
...
...
@@ -855,6 +853,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
@Override
public
synchronized
void
stop
()
{
logger
.
log
(
BasicLevel
.
ERROR
,
"RestAcquisitionAsync.Daemon.stop()"
,
new
Exception
());
super
.
stop
();
}
@Override
...
...
@@ -865,7 +864,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
@Override
protected
void
shutdown
()
{
// TODO (AF): force jersey to close
close
();
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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