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
0ec1c595
Commit
0ec1c595
authored
Apr 22, 2020
by
Locatelli
Browse files
Add plotyVersion server property
Do switch stuff between this version
parent
3fb0e8c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/bridge/ChangeManager.java
View file @
0ec1c595
...
@@ -28,6 +28,7 @@ import fr.ill.ics.nscclient.notification.commandzone.CommandZoneEventClient;
...
@@ -28,6 +28,7 @@ import fr.ill.ics.nscclient.notification.commandzone.CommandZoneEventClient;
import
fr.ill.ics.nscclient.notification.commandzone.sync.CommandZoneSyncEventClient
;
import
fr.ill.ics.nscclient.notification.commandzone.sync.CommandZoneSyncEventClient
;
import
fr.ill.ics.nscclient.ploty.PlotyInstance
;
import
fr.ill.ics.nscclient.ploty.PlotyInstance
;
import
fr.ill.ics.nscclient.survey.SurveySubscriberImpl
;
import
fr.ill.ics.nscclient.survey.SurveySubscriberImpl
;
import
fr.ill.ics.util.ConfigManager
;
public
class
ChangeManager
{
public
class
ChangeManager
{
...
@@ -51,7 +52,9 @@ public class ChangeManager {
...
@@ -51,7 +52,9 @@ public class ChangeManager {
DataNotificationClient
.
getInstance
().
readAndDispatch
();
DataNotificationClient
.
getInstance
().
readAndDispatch
();
CommandZoneEventClient
.
getInstance
().
readAndDispatch
();
CommandZoneEventClient
.
getInstance
().
readAndDispatch
();
CommandZoneSyncEventClient
.
getInstance
().
readAndDispatch
();
CommandZoneSyncEventClient
.
getInstance
().
readAndDispatch
();
PlotyInstance
.
getInstance
().
readAndDispatch
();
if
(
ConfigManager
.
getInstance
().
getPlotyVersion
()
==
2
)
{
PlotyInstance
.
getInstance
().
readAndDispatch
();
}
// Iterate the map of log subscribers.
// Iterate the map of log subscribers.
Map
<
String
,
LogSubscriber
>
logSubscriberMap
=
LogSubscriber
.
getInstances
();
Map
<
String
,
LogSubscriber
>
logSubscriberMap
=
LogSubscriber
.
getInstances
();
...
...
src/main/java/fr/ill/ics/nscclient/sessionmanagement/ServerSessionManager.java
View file @
0ec1c595
...
@@ -39,6 +39,7 @@ import fr.ill.ics.nscclient.servant.ConfigurationManager.LoadFailure;
...
@@ -39,6 +39,7 @@ import fr.ill.ics.nscclient.servant.ConfigurationManager.LoadFailure;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager.ClientAlreadyLaunchedException
;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager.ClientAlreadyLaunchedException
;
import
fr.ill.ics.nscclient.survey.SurveySubscriberImpl
;
import
fr.ill.ics.nscclient.survey.SurveySubscriberImpl
;
import
fr.ill.ics.nscclient.variable.VariableManagerAccessor
;
import
fr.ill.ics.nscclient.variable.VariableManagerAccessor
;
import
fr.ill.ics.util.ConfigManager
;
public
class
ServerSessionManager
{
public
class
ServerSessionManager
{
...
@@ -151,7 +152,9 @@ public class ServerSessionManager {
...
@@ -151,7 +152,9 @@ public class ServerSessionManager {
SurveySubscriberImpl
.
getInstance
(
serverId
).
unsubscribe
();
SurveySubscriberImpl
.
getInstance
(
serverId
).
unsubscribe
();
DataChangeSubscriber
.
getInstance
(
serverId
).
unsubscribe
();
DataChangeSubscriber
.
getInstance
(
serverId
).
unsubscribe
();
if
(
serverId
.
equals
(
"real"
))
{
if
(
serverId
.
equals
(
"real"
))
{
PlotyInstance
.
getInstance
().
unsubscribe
();
if
(
ConfigManager
.
getInstance
().
getPlotyVersion
()
==
2
)
{
PlotyInstance
.
getInstance
().
unsubscribe
();
}
}
}
DataAccessor
.
getInstance
(
serverId
).
reset
();
DataAccessor
.
getInstance
(
serverId
).
reset
();
...
@@ -188,11 +191,13 @@ public class ServerSessionManager {
...
@@ -188,11 +191,13 @@ public class ServerSessionManager {
}
}
if
(
serverId
.
equals
(
"real"
))
{
if
(
serverId
.
equals
(
"real"
))
{
try
{
if
(
ConfigManager
.
getInstance
().
getPlotyVersion
()
==
2
)
{
PlotyInstance
.
getInstance
().
unsubscribe
();
try
{
}
catch
(
Exception
e
)
{
PlotyInstance
.
getInstance
().
unsubscribe
();
System
.
out
.
println
(
"Cannot unsubscribe data change"
);
}
catch
(
Exception
e
)
{
}
System
.
out
.
println
(
"Cannot unsubscribe data change"
);
}
}
}
}
}
}
...
...
src/main/java/fr/ill/ics/util/ConfigManager.java
View file @
0ec1c595
...
@@ -615,6 +615,14 @@ public class ConfigManager {
...
@@ -615,6 +615,14 @@ public class ConfigManager {
return
false
;
return
false
;
}
}
public
int
getPlotyVersion
()
{
String
value
=
getStringOrNothingAtAll
(
"plotyVersion"
);
if
(
value
!=
null
)
{
return
Integer
.
valueOf
(
value
);
}
return
1
;
}
public
boolean
isRemoteClient
()
{
public
boolean
isRemoteClient
()
{
return
remoteClient
;
return
remoteClient
;
}
}
...
...
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