Bug #1617
misplaced D1Client.getCN() in MNode constructor
100%
Description
Want to be able to instantiate an MNode without invoking D1Client(), which is intended to act as a facade in the future.
For desired behavior, create an MNode constructor that takes as a parameter either a NodeList or CNode object.
Also a constructor that allows creation independent of a CN. (We are only using this dependency to facilitate MNode construction using a NodeReference).
History
#1 Updated by Rob Nahf over 13 years ago
An MNode should be able to get it's ID by calling itself. (the client-side class calling the service at the other end of the baseURL). This is probably not set up yet, but when cn.register() is implemented, the MNode registers itself and receives it's ID, which should be retrievable later via mn.getCapabilities() - assuming when the nodeList is returned, it includes its own ID.
(Why does getCapabilities return a NodeList instead of a Node? hmm...)
#2 Updated by Rob Nahf over 13 years ago
Latest thought: is it appropriate to put an http call to (the CN) in the MNode constructor? How would we unit test? My preference would be to defer the http call to a getNodeID() method, and change the constructor that accepts a NodeReference to also take a NodeList.
#3 Updated by Rob Nahf over 13 years ago
- Assignee set to Rob Nahf
#4 Updated by Rob Nahf over 13 years ago
- Subject changed from buggy implementation of D1Client.getCN in MNode constructor to misplaced D1Client.getCN() in MNode constructor
- Target version deleted (
Sprint-2011.22-Block.3)
#5 Updated by Dave Vieglais over 13 years ago
- Position set to 1
- Target version set to Sprint-2011.26-Block.4
- Position deleted (
31)
#6 Updated by Rob Nahf over 13 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
refactored client to remove http calls from constructors. (both MNode and CNode)