Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Shervin Nourbakhsh
cameo
Commits
53ee8bf1
Commit
53ee8bf1
authored
Feb 18, 2020
by
legoc
Browse files
Create a request socket to cancel the publisher
parent
260fa990
Changes
1
Hide whitespace changes
Inline
Side-by-side
cameo-api/src/main/java/fr/ill/ics/cameo/impl/PublisherImpl.java
View file @
53ee8bf1
...
...
@@ -157,16 +157,13 @@ public class PublisherImpl {
CancelPublisherSyncCommand
command
=
CancelPublisherSyncCommand
.
newBuilder
().
build
();
request
.
add
(
command
.
toByteArray
());
try
{
Zmq
.
Msg
reply
=
application
.
tryRequest
(
request
,
endpoint
);
byte
[]
messageData
=
reply
.
getFirstData
();
RequestResponse
requestResponse
=
null
;
requestResponse
=
RequestResponse
.
parseFrom
(
messageData
);
}
catch
(
InvalidProtocolBufferException
e
)
{
throw
new
UnexpectedException
(
"Cannot parse response"
);
}
// Create the request socket. We can create it here because it should be called only once.
RequestSocket
requestSocket
=
application
.
createRequestSocket
(
endpoint
);
requestSocket
.
request
(
request
);
// Terminate the socket.
requestSocket
.
terminate
();
}
public
void
send
(
byte
[]
data
)
{
...
...
Write
Preview
Markdown
is supported
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