Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
DiSL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DiSL
DiSL
Commits
8b709571
Commit
8b709571
authored
Nov 25, 2018
by
Vít Kabele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary public modifiers. Added getters and setters where needed.
parent
1830d6a1
Pipeline
#3510
passed with stages
in 3 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
disl-server/src/ch/usi/dag/dislserver/ConnectionHandler.java
disl-server/src/ch/usi/dag/dislserver/ConnectionHandler.java
+5
-5
disl-server/src/ch/usi/dag/dislserver/SessionCredentials.java
...-server/src/ch/usi/dag/dislserver/SessionCredentials.java
+10
-6
No files found.
disl-server/src/ch/usi/dag/dislserver/ConnectionHandler.java
View file @
8b709571
...
...
@@ -111,8 +111,8 @@ final class ConnectionHandler implements Runnable {
off
+=
delivery
.
getSizes
(
i
);
credentials
.
instrumentationJars
.
add
(
bytes
);
}
credentials
.
processor
=
RequestProcessor
.
newInstance
(
credentials
.
instrumentationJars
);
credentials
.
s
tate
=
SessionCredentials
.
SessionState
.
READY
;
credentials
.
setProcessor
(
RequestProcessor
.
newInstance
(
credentials
.
instrumentationJars
)
);
credentials
.
s
etState
(
SessionCredentials
.
SessionState
.
READY
)
;
response
=
ServerMessage
.
newBuilder
()
...
...
@@ -136,7 +136,7 @@ final class ConnectionHandler implements Runnable {
response
=
ServerMessage
.
newBuilder
()
.
setInstrumentClassResponse
(
credentials
.
processor
.
process
(
request
.
getInstrumentClassRequest
())
credentials
.
getProcessor
()
.
process
(
request
.
getInstrumentClassRequest
())
).
build
();
timer
.
mark
(
DiSLServer
.
ElapsedTime
.
PROCESS
);
...
...
@@ -153,8 +153,8 @@ final class ConnectionHandler implements Runnable {
int
session_id
=
request
.
getSessionId
();
credentials
=
__server
.
getSession
(
session_id
);
if
(
credentials
==
null
)
throw
new
DiSLServerException
(
"Invalid session id received"
);
credentials
.
processor
.
terminate
();
credentials
.
s
tate
=
SessionCredentials
.
SessionState
.
CLOSED
;
credentials
.
getProcessor
()
.
terminate
();
credentials
.
s
etState
(
SessionCredentials
.
SessionState
.
CLOSED
)
;
case
REQUEST_NOT_SET:
default
:
break
REQUEST_LOOP
;
...
...
disl-server/src/ch/usi/dag/dislserver/SessionCredentials.java
View file @
8b709571
...
...
@@ -13,17 +13,17 @@ import java.util.List;
/**
* Pack the values related to one session.
*/
public
class
SessionCredentials
{
class
SessionCredentials
{
/**
* Session identifier
*/
public
final
int
sessionId
;
final
int
sessionId
;
/**
* Available states of the session.
*/
public
enum
SessionState
{
enum
SessionState
{
/**
* Default
*/
...
...
@@ -46,17 +46,21 @@ public class SessionCredentials {
/**
* State of the session.
*/
public
SessionState
state
=
SessionState
.
INITIALIZED
;
private
SessionState
state
=
SessionState
.
INITIALIZED
;
void
setState
(
SessionState
state
){
this
.
state
=
state
;
}
SessionState
getState
(){
return
state
;
}
/**
* Byte arrays representing files with instrumentation.
*/
List
<
byte
[]>
instrumentationJars
=
new
ArrayList
<>();
final
List
<
byte
[]>
instrumentationJars
=
new
ArrayList
<>();
/**
* A request processor to handle the instrumentation requests.
*/
RequestProcessor
processor
;
private
RequestProcessor
processor
;
void
setProcessor
(
RequestProcessor
processor
){
this
.
processor
=
processor
;
}
RequestProcessor
getProcessor
(){
return
processor
;
}
/**
* Construct the class
...
...
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