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
Cameo
cameo
Commits
6fd5dcec
Commit
6fd5dcec
authored
Dec 15, 2021
by
legoc
Browse files
Removed some useless methods
parent
d5eac3fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
cameo-api/src/main/java/fr/ill/ics/cameo/base/Server.java
View file @
6fd5dcec
...
...
@@ -171,26 +171,6 @@ public class Server {
return
false
;
}
public
void
sendSync
()
{
try
{
requestSocket
.
requestJSON
(
Messages
.
createSyncRequest
());
}
catch
(
ConnectionTimeout
e
)
{
// do nothing
}
}
public
void
sendSyncStream
(
String
name
)
{
try
{
requestSocket
.
requestJSON
(
Messages
.
createSyncStreamRequest
(
name
));
}
catch
(
ConnectionTimeout
e
)
{
// do nothing
}
}
private
void
retrieveServerVersion
()
{
...
...
@@ -311,14 +291,6 @@ public class Server {
return
new
Response
(
JSON
.
getInt
(
response
,
Messages
.
RequestResponse
.
VALUE
),
JSON
.
getString
(
response
,
Messages
.
RequestResponse
.
MESSAGE
));
}
public
int
getStreamPort
(
String
name
)
throws
ConnectionTimeout
{
JSONObject
request
=
Messages
.
createOutputPortRequest
(
name
);
JSONObject
response
=
requestSocket
.
requestJSON
(
request
);
return
JSON
.
getInt
(
response
,
Messages
.
RequestResponse
.
VALUE
);
}
/**
* Sends start request with parameters and Result object.
* If the outputStream argument is true, then if the application has enabled output stream, an OutputStreamSocket is created.
...
...
@@ -666,13 +638,21 @@ public class Server {
return
result
;
}
private
int
getStreamPort
(
String
name
)
throws
ConnectionTimeout
{
JSONObject
request
=
Messages
.
createOutputPortRequest
(
name
);
JSONObject
response
=
requestSocket
.
requestJSON
(
request
);
return
JSON
.
getInt
(
response
,
Messages
.
RequestResponse
.
VALUE
);
}
private
OutputStreamSocket
createOutputStreamSocket
(
String
name
)
{
OutputStreamSocket
outputStreamSocket
=
new
OutputStreamSocket
(
name
);
int
port
=
getStreamPort
(
name
);
if
(
port
==
-
1
)
{
return
null
;
}
...
...
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