Example #1
0
 /**
  * The overloaded method for now is used to allow RpcManager to be replaced
  * by MockRpcManager in unit tests.
  */
 public void Update(Node node, RpcManager rpc) {
   _rpc = rpc;
   _node = node;
   _xrm = new XmlRpcManager(_node, _rpc);
   _rpc.AddHandler("xmlrpc", _xrm);
   RemotingServices.Marshal(_xrm, "xm.rem");
 }
 /**
  * The overloaded method for now is used to allow distinct Uri for multiple XmlRpcManagerServer.
  */
 public void Update(Node node, string type) {
   RpcManager rpc = RpcManager.GetInstance(node);
   _rpc = rpc;
   _node = node;
   _xrm = new XmlRpcManager(_node, _rpc);
   _rpc.AddHandler("xmlrpc", _xrm);
   string svc_name = type + "xm.rem";
   RemotingServices.Marshal(_xrm, svc_name);
 }
 /// <summary>
 /// The overloaded method for now is used to allow RpcManager to be replaced
 /// by MockRpcManager in unit tests.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="rpc"></param>
 /// <param name="uri"></param>
 internal void Add(Node node, RpcManager rpc, string uri) {
   var xrm = new XmlRpcManager(node, rpc);
   lock (_sync_root) {
     // throw an exception if this mapping exists...
     _xrm_mappings.Add(node, xrm);
     RemotingServices.Marshal(xrm, uri);
     CheckAndSetDefaultManager();
   }
   rpc.AddHandler("xmlrpc", xrm);
 }
 public void Update(Node node, BrunetSecurityOverlord bso)
 {
   RpcManager rpc = RpcManager.GetInstance(node);
   _rpc = rpc;
   _node = node;
   _xrm = new XmlRpcManager(_node, _rpc, bso);
   _rpc.AddHandler("xmlrpc", _xrm);
   RemotingServices.Marshal(_xrm, "xm.rem");
 }
 /// <summary>
 /// Allows nodes to be registered by whatever URI the user provides
 /// </summary>
 /// <param name="node"></param>
 /// <param name="uri"></param>
 public void Add(Node node, string uri) {
   var xrm = new XmlRpcManager(node, node.Rpc);
   lock (_sync_root) {
     // throw an exception if this mapping exists...
     _xrm_mappings.Add(node, xrm);
     RemotingServices.Marshal(xrm, uri);
     CheckAndSetDefaultManager();
   }
   // We only add this if there is no exception above...
   node.Rpc.AddHandler("xmlrpc", xrm);
 }