-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
/** | ||
* Dummy adapter, used in tests | ||
*/ | ||
require('swarmutil').createAdapter("Null*"); | ||
require('swarmutil').createAdapter("Null*",null, function(swarm){ | ||
cprint("Null* ignored swarm message "+ M(swarm)); | ||
}, false); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
/* | ||
How sessions are handled in swarmESB: | ||
SessionId | ||
responseURI | ||
actor:id | ||
SessionManager configuration | ||
- uuid | ||
- maxSessions | ||
session | ||
TCPOutlet | ||
SessionInfo: | ||
sessionId | ||
userId | ||
tenantId | ||
pendingCmds | ||
isClosed | ||
WebSocketOutlet | ||
SessionId | ||
responseURI: uuid of the entry adapter | ||
clientSwarmletId | ||
WebServiceOutlet | ||
session | ||
JSONOutlet | ||
WebSocketOutlet | ||
WebServiceOutlet | ||
*/ | ||
|
||
var uuid = require('node-uuid'); | ||
var workerId = "worker:" + uuid.v4(); | ||
thisAdapter = require('swarmutil').createAdapter(workerId,null); | ||
|
||
require('swarmutil').createAdapter(workerId,onReadyCallback); | ||
|
||
function onReadyCallback(){ | ||
|
||
|
||
} | ||
|
||
|
||
doWork = function(){ | ||
//do something | ||
} | ||
thisAdapter.join("@SessionManager"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters