Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
2cfa63ed
Commit
2cfa63ed
authored
Mar 06, 2015
by
Jerome Locatelli
Browse files
add specific login for the tablette without some inits for optimizing loading time
parent
2a50aa83
Changes
3
Hide whitespace changes
Inline
Side-by-side
.classpath
View file @
2cfa63ed
...
...
@@ -2,9 +2,9 @@
<classpath>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"lib"
path=
"lib
64
/avalon-framework-4.
2.0
.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib
64
/jacorb.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib
64
/logkit-
2.0
.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib
64
/protobuf-2.5.0.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib/avalon-framework-4.
1.5
.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib/jacorb.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib/logkit-
1.2
.jar"
/>
<classpathentry
kind=
"lib"
path=
"lib/protobuf-
java-
2.5.0.jar"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
src/fr/ill/ics/bridge/LoginManager.java
View file @
2cfa63ed
...
...
@@ -76,7 +76,19 @@ 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
(
CorbaSessionManager
.
ClientAlreadyLaunchedException
e
)
{
throw
new
ClientAlreadyLaunchedException
();
}
catch
(
ServerSessionManager
.
ConnectionFailure
e
)
{
throw
new
ConnectionFailure
();
}
catch
(
LoadFailure
e
)
{
throw
new
ConnectionFailure
();
}
}
public
String
getStatusMessage
()
{
return
ServerConnection
.
getInstance
(
"real"
).
getStatusMessage
();
}
...
...
src/fr/ill/ics/nscclient/sessionmanagement/ServerSessionManager.java
View file @
2cfa63ed
...
...
@@ -129,6 +129,37 @@ public class ServerSessionManager {
LogSubcriberImpl
.
getInstance
(
serverId
).
subscribe
();
}
public
void
logintab
(
boolean
standAlone
)
throws
CorbaSessionManager
.
ClientAlreadyLaunchedException
,
ConnectionFailure
,
LoadFailure
{
CorbaSessionManager
.
getInstance
(
serverId
).
init
();
// See if the Server is up and running
if
(!
CorbaSessionManager
.
getInstance
(
serverId
).
isOk
())
{
System
.
err
.
println
(
"Failed to connect to server "
+
serverId
);
throw
new
ConnectionFailure
();
}
// initialise DataAccessor
DataAccessor
.
getInstance
(
serverId
).
init
();
if
(
currentSession
!=
null
)
{
currentSession
.
logout
();
}
currentSession
=
CorbaSessionManager
.
getInstance
(
serverId
).
login
(
standAlone
);
// The test is for initialising the controller manager and driver manager in the following cases:
// - real server
// - simulated server with no real server logged
// This is because ControllerManager and DriverManager are accessed by getInstance() without any serverId
if
(
serverId
.
equals
(
"real"
)
||
(!
serverId
.
equals
(
"real"
)
&&
!
getInstance
(
"real"
).
isLogged
()))
{
ConfigurationManager
.
initInstance
(
serverId
);
ResourceManager
.
initInstance
(
serverId
);
ControllerManager
.
initInstance
(
serverId
);
DriverManager
.
initInstance
(
serverId
);
}
}
public
void
logout
()
{
ServerCommandZoneEventManager
.
getInstance
(
serverId
).
reset
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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