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
Instrument Control
NomadCommandSystem
Commits
2f7ac3d9
Commit
2f7ac3d9
authored
Jun 15, 2020
by
legoc
Browse files
Added sendCrashMail method in SessionManager
parent
e0014553
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/nscclient/sessionmanagement/SessionManager.java
View file @
2f7ac3d9
...
...
@@ -309,8 +309,7 @@ public class SessionManager {
System
.
err
.
println
(
"error in parsing response of sendChatMessage"
);
}
}
public
synchronized
int
getServerPlotyVersion
()
{
// Create the message type.
...
...
@@ -330,6 +329,28 @@ public class SessionManager {
return
version
;
}
public
synchronized
void
sendCrashMail
(
String
content
)
{
// Create the message type.
SessionRequests
.
Message
type
=
SessionRequests
.
Message
.
newBuilder
()
.
setType
(
SessionRequests
.
Message
.
Type
.
CrashMail
)
.
build
();
// Create the request.
SessionRequests
.
CrashMailRequest
request
=
SessionRequests
.
CrashMailRequest
.
newBuilder
()
.
setContent
(
content
)
.
build
();
sessionRequester
.
sendTwoParts
(
type
.
toByteArray
(),
request
.
toByteArray
());
try
{
Common
.
BooleanResponse
.
parseFrom
(
sessionRequester
.
receive
());
}
catch
(
InvalidProtocolBufferException
e
)
{
System
.
err
.
println
(
"error in parsing response of sendChatMessage"
);
}
}
public
boolean
isOk
()
{
return
allOk
;
}
...
...
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