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
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
joram
joram
Commits
87541ec5
Commit
87541ec5
authored
Nov 13, 2017
by
afreyssin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix: Test if the client context is valid (JORAM-281).
parent
dea73ebc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/notifications/ReceiveRequest.java
...org/objectweb/joram/mom/notifications/ReceiveRequest.java
+9
-3
No files found.
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/notifications/ReceiveRequest.java
View file @
87541ec5
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 20
06
ScalAgent Distributed Technologies
* Copyright (C) 2001 - 20
17
ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
...
...
@@ -23,6 +23,8 @@
*/
package
org.objectweb.joram.mom.notifications
;
import
org.objectweb.joram.mom.proxies.UserAgent
;
import
fr.dyade.aaa.agent.AgentId
;
import
fr.dyade.aaa.common.encoding.Decoder
;
import
fr.dyade.aaa.common.encoding.EncodableHelper
;
...
...
@@ -129,13 +131,18 @@ public class ReceiveRequest extends AbstractRequestNot {
if
(
timeOut
>
0
)
this
.
expirationTime
=
startTime
+
timeOut
;
}
/**
* Returns <code>false</code> if the request expired.
*
* @param currentTime The current time to verify the expiration time.
*/
public
boolean
isValid
(
long
currentTime
)
{
// TODO (AF): May be we have to memorize the CCUID in order to avoid to create
// multiples instances.
if
(!
UserAgent
.
isValidCC
(
requester
,
getClientContext
()))
// The client context is no longer valid (JORAM-281).
return
false
;
if
(
timeOut
>
0
)
return
currentTime
<
expirationTime
;
return
true
;
...
...
@@ -231,5 +238,4 @@ public class ReceiveRequest extends AbstractRequestNot {
}
timeOut
=
decoder
.
decodeUnsignedLong
();
}
}
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