/** * 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"); }
public new static MockRpcManager GetInstance(Node node) { if(_instance == null) { ReqrepManager rrm = ReqrepManager.GetInstance(node); _instance = new MockRpcManager(rrm); } return _instance; }
public XmlRpcManager(Node node, RpcManager rpc) { _node = node; _rpc = rpc; }
public void Update(Node node) { RpcManager rpc = RpcManager.GetInstance(node); Update(node, rpc); }
public new static MockRpcManager GetInstance(Node node) { if(_instance == null) { _instance = new MockRpcManager(node.Rrm); } return _instance; }
/** * @param url the URL of the XML-RPC service. * @param rpc The XmlRpcManager instance that the handler uses. */ public XmlRpcHandler(string url, Node node) { this.Url = url; _node = node; _rpc = _node.Rpc; }
/// <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, uri); 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); }
/// <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); }
/// <summary> /// Adds the specified node to listen to XMLRPC proxy calls. /// </summary> /// <param name="node">The node.</param> /// <remarks>Uses a node's string version of Brunet address plus ".rem" as the /// relative Uri.</remarks> public virtual void Add(Node node) { Add(node, string.Format("{0}.rem", node.Address.ToString())); }
/// <summary> /// Stops the specified node from listening to XMLRPC proxy calls. /// </summary> /// <param name="node">The node.</param> public void Remove(Node node) { lock (_sync_root) { RemotingServices.Disconnect(_xrm_mappings[node]); node.Rpc.RemoveHandler("xmlrpc"); _xrm_mappings.Remove(node); CheckAndSetDefaultManager(); } }
public XmlRpcManager(Node node, RpcManager rpc, string uri) { Uri = uri; _node = node; _rpc = rpc; }
/** * 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); }
/** * 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"); } */ public void Update(Node node, RpcManager rpc) { Update(node,""); }
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"); }
public XmlRpcManager(Node node, RpcManager rpc, BrunetSecurityOverlord bso) : this(node, rpc) { _bso = bso; }