Skip to content

Commit

Permalink
Issue #4: starting work on client forwarder cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Jul 30, 2023
1 parent 341a4d0 commit 5371f31
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 2 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
defaultAction
| result |
result := self performSendNoForwarder: [ self resume: (Array with: #resume with: nil) ].
self resume: (Array with: #resume with: result)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
as yet unclassified
performSendNoForwarder: noForwarderBlock
| forwarder clientForwarderOop selector args messageArgs |
args := self tag args.
clientForwarderOop := session asOopType: (args at: 1).
forwarder := session clientObjectForwardedFrom: clientForwarderOop.
forwarder == nil
ifTrue: [ ^ noForwarderBlock value ].
selector := args at: 3.
messageArgs := args at: 4.
^ forwarder performFromServer: selector with: messageArgs using: session
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
session: aGciSession
session := aGciSession
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
session
^ session
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"class" : {
},
"instance" : {
"defaultAction" : "dkh 1/11/2014 15:01",
"performSendNoForwarder:" : "dkh 1/11/2014 15:00",
"session" : "dkh 11/18/2012 08:18",
"session:" : "dkh 11/18/2012 08:19" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "GsDevKit_stones-Tode",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"session" ],
"name" : "GsClientForwarderSendNotification",
"pools" : [
],
"super" : "Notification",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ _serverExecuteString: executeString debugMode: debugMode
[ self session nbExecute: doitString ]
on: GsErrorNotification
do: [ :ex | self error: 'Unable to execute #executeString: on tODE server' ].
^ self session nbResult
[ ^ self session nbResult ]
on: GciError
do: [ :ex |
ex gsNumber = 2336
ifTrue: [
self halt. "need to make sure that we are using the client forwarder cache for look up"
GsClientForwarderSendNotification new
session: self;
tag: ex gciErrSType;
signal ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,22 @@ topezServerProxy
error:
'Unable to log into server:' , ex description , 'with: '
, todeServerCreationString printString ] ].
"
^ {(topezServer asOop).
transcriptClientForwarderOop.
(Reflection oopOf: topezClientClientForwarder).
(TodeObjectSerializer protocolSignatureArray).
(self todeServerAPIVersionString)}
"
resultArray := STON fromString: jsonString.
resultArray halt. "need to make sure that the clientForwarderCache is updated correctly"
topezServerOop := resultArray at: 1.
topezClientOopType := resultArray at: 3.
topezServerProxy := topezServerOop.
(resultArray at: 2)
ifNotNil: [ :transcriptOop |
transcriptOopType := transcriptOop.
self clientForwarderCache at: transcriptOopType put: Transcript ].
self clientForwarderCache at: transcriptOopType put: GsFile stdout ].
self clientForwarderCache at: topezClientOopType put: self.
resultArray size > 3
ifTrue: [
Expand Down

0 comments on commit 5371f31

Please sign in to comment.