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
ecdede54
Commit
ecdede54
authored
Jul 17, 2020
by
helene ortiz
Browse files
version 4.0.28
parent
37ebb839
Changes
5
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
ecdede54
4.0.28 17/07/2020
------
* Add token stuff in ploty2
* Manage specific error messages for remote computers: multiple connections per user or multiple clients per endpoint.
* Implemented the check of client (TOKEN_NOT_OWNED error)
* Client type is passed at login
4.0.27 06/07/2020
------
...
...
pom.xml
View file @
ecdede54
...
...
@@ -2,7 +2,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
fr.ill.ics
</groupId>
<artifactId>
nomadcommandsystem
</artifactId>
<version>
4.0.
30-beta
</version>
<version>
4.0.
28
</version>
<name>
NomadCommandSystem
</name>
<description>
Java bridge for the communication with the Nomad server
</description>
<scm>
...
...
src/main/java/fr/ill/ics/bridge/LoginManager.java
View file @
ecdede54
...
...
@@ -38,15 +38,19 @@ public class LoginManager {
}
public
class
LoginIncorrectException
extends
Exception
{}
public
class
MultipleClientsPerEndpointNotAllowedException
extends
Exception
{}
public
class
MultipleConnectionsPerUserNotAllowedException
extends
Exception
{}
public
class
ClientAlreadyLaunchedException
extends
Exception
{}
public
class
ConnectionFailure
extends
Exception
{};
public
void
login
(
String
login
,
boolean
standalone
,
String
serverId
)
throws
LoginIncorrectException
,
ClientAlreadyLaunch
edException
,
ConnectionFailure
{
public
void
login
(
String
login
,
boolean
standalone
,
String
serverId
)
throws
LoginIncorrectException
,
MultipleClientsPerEndpointNotAllowedException
,
MultipleConnectionsPerUserNotAllow
edException
,
ConnectionFailure
{
try
{
ServerSessionManager
.
getInstance
(
serverId
).
login
(
standalone
,
login
);
}
catch
(
SessionManager
.
ClientAlreadyLaunchedException
e
)
{
throw
new
ClientAlreadyLaunchedException
();
}
catch
(
SessionManager
.
MultipleConnectionsPerUserNotAllowedException
e
)
{
throw
new
MultipleConnectionsPerUserNotAllowedException
();
}
catch
(
SessionManager
.
MultipleClientsPerEndpointNotAllowedException
e
)
{
throw
new
MultipleClientsPerEndpointNotAllowedException
();
}
catch
(
ServerSessionManager
.
ConnectionFailure
e
)
{
throw
new
ConnectionFailure
();
}
catch
(
LoadFailure
e
)
{
...
...
@@ -58,7 +62,7 @@ public class LoginManager {
public
void
logintab
(
String
login
,
String
password
,
boolean
standalone
,
String
serverId
)
throws
LoginIncorrectException
,
ClientAlreadyLaunchedException
,
ConnectionFailure
{
try
{
ServerSessionManager
.
getInstance
(
serverId
).
logintab
(
standalone
);
}
catch
(
SessionManager
.
ClientAlreadyLaunch
edException
e
)
{
}
catch
(
SessionManager
.
MultipleConnectionsPerUserNotAllowedException
|
SessionManager
.
MultipleClientsPerEndpointNotAllow
edException
e
)
{
throw
new
ClientAlreadyLaunchedException
();
}
catch
(
ServerSessionManager
.
ConnectionFailure
e
)
{
throw
new
ConnectionFailure
();
...
...
src/main/java/fr/ill/ics/nscclient/sessionmanagement/ServerSessionManager.java
View file @
ecdede54
...
...
@@ -36,7 +36,8 @@ import fr.ill.ics.nscclient.notification.commandzone.ServerCommandZoneEventManag
import
fr.ill.ics.nscclient.ploty.PlotyInstance
;
import
fr.ill.ics.nscclient.servant.ConfigurationManager
;
import
fr.ill.ics.nscclient.servant.ConfigurationManager.LoadFailure
;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager.ClientAlreadyLaunchedException
;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager.MultipleClientsPerEndpointNotAllowedException
;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager.MultipleConnectionsPerUserNotAllowedException
;
import
fr.ill.ics.nscclient.survey.SurveySubscriberImpl
;
import
fr.ill.ics.nscclient.variable.VariableManagerAccessor
;
import
fr.ill.ics.util.ConfigManager
;
...
...
@@ -84,14 +85,13 @@ public class ServerSessionManager {
return
instances
.
get
(
serverId
);
}
public
void
login
(
boolean
standAlone
,
String
user
)
throws
SessionManager
.
ClientAlreadyLaunch
edException
,
ConnectionFailure
,
LoadFailure
{
public
void
login
(
boolean
standAlone
,
String
user
)
throws
MultipleConnectionsPerUserNotAllowedException
,
MultipleClientsPerEndpointNotAllow
edException
,
ConnectionFailure
,
LoadFailure
{
init
();
try
{
SessionManager
.
getInstance
(
serverId
).
login
(
standAlone
,
ConfigManager
.
getInstance
().
getClientType
(),
user
);
}
catch
(
ClientAlreadyLaunchedException
e
)
{
}
catch
(
MultipleConnectionsPerUserNotAllowedException
|
MultipleClientsPerEndpointNotAllowedException
e
)
{
// Only rethrow the exception. The call to logoutAll is made in the main application.
throw
e
;
}
...
...
@@ -109,7 +109,7 @@ public class ServerSessionManager {
}
}
public
void
logintab
(
boolean
standAlone
)
throws
SessionManager
.
ClientAlreadyLaunch
edException
,
ConnectionFailure
,
LoadFailure
{
public
void
logintab
(
boolean
standAlone
)
throws
MultipleClientsPerEndpointNotAllowedException
,
MultipleConnectionsPerUserNotAllow
edException
,
ConnectionFailure
,
LoadFailure
{
SessionManager
.
getInstance
(
serverId
).
init
();
...
...
@@ -126,8 +126,7 @@ public class ServerSessionManager {
try
{
SessionManager
.
getInstance
(
serverId
).
login
(
standAlone
,
"tablet"
);
}
catch
(
ClientAlreadyLaunchedException
e
)
{
}
catch
(
MultipleConnectionsPerUserNotAllowedException
|
MultipleClientsPerEndpointNotAllowedException
e
)
{
logoutAll
(
false
);
throw
e
;
}
...
...
src/main/java/fr/ill/ics/nscclient/sessionmanagement/SessionManager.java
View file @
ecdede54
...
...
@@ -104,11 +104,11 @@ public class SessionManager {
sessionRequester
.
terminate
();
}
public
void
login
(
boolean
standAlone
,
String
clientType
)
throws
ClientAlreadyLaunch
edException
{
public
void
login
(
boolean
standAlone
,
String
clientType
)
throws
MultipleConnectionsPerUserNotAllowedException
,
MultipleClientsPerEndpointNotAllow
edException
{
login
(
standAlone
,
clientType
,
null
);
}
public
synchronized
void
login
(
boolean
standAlone
,
String
clientType
,
String
user
)
throws
ClientAlreadyLaunch
edException
{
public
synchronized
void
login
(
boolean
standAlone
,
String
clientType
,
String
user
)
throws
MultipleConnectionsPerUserNotAllowedException
,
MultipleClientsPerEndpointNotAllow
edException
{
// Create the message type.
SessionRequests
.
Message
type
=
SessionRequests
.
Message
.
newBuilder
()
...
...
@@ -139,10 +139,10 @@ public class SessionManager {
// Process the error.
if
(
response
.
getError
()
==
Common
.
Error
.
Type
.
MULTIPLE_CONNECTIONS_PER_USER_NOT_ALLOWED
)
{
throw
new
ClientAlreadyLaunch
edException
();
throw
new
MultipleConnectionsPerUserNotAllow
edException
();
}
else
if
(
response
.
getError
()
==
Common
.
Error
.
Type
.
MULTIPLE_CLIENTS_PER_ENDPOINT_NOT_ALLOWED
)
{
throw
new
ClientAlreadyLaunch
edException
();
throw
new
MultipleClientsPerEndpointNotAllow
edException
();
}
// Get the client id.
...
...
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