**** Merged from MCS ****
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Messaging / MessagingConfiguration.cs
blob1f679a6cc70be31fce221c217c300558ab58e405
1 //
2 // Microsoft.Web.Services.Messaging.Configuration.MessagingConfiguration.cs
3 //
4 // Author: Todd Berman <tberman@gentoo.org>
5 //
6 // (C) 2003 Todd Berman
8 using System;
9 using System.Xml;
10 using System.Collections;
11 using Microsoft.Web.Services.Messaging;
12 using Microsoft.Web.Services.Configuration;
14 namespace Microsoft.Web.Services.Messaging.Configuration
16 public class MessagingConfiguration : ConfigurationBase
19 private static Hashtable _transports;
21 static MessagingConfiguration ()
23 _transports = new Hashtable ();
26 public MessagingConfiguration () : base ()
28 //Add transports here
29 AddTransport ("soap.tcp", new SoapTcpTransport ());
32 public void AddTransport (string scheme, ISoapTransport trans)
34 if(scheme == null || scheme.Length == 0) {
35 throw new ArgumentNullException ("scheme");
37 if(trans == null) {
38 throw new ArgumentNullException ("transport");
40 _transports[scheme] = trans;
43 public ISoapTransport GetTransport (string scheme)
45 if(scheme == null || scheme.Length == 0) {
46 throw new ArgumentNullException ("scheme");
48 return (ISoapTransport)_transports[scheme];
51 public void RemoveTransport (string scheme)
53 if(scheme == null || scheme.Length == 0) {
54 throw new ArgumentNullException ("scheme");
56 _transports.Remove (scheme);
59 [MonoTODO]
60 public void Load (XmlNode node)
62 throw new NotImplementedException ();
65 public ICollection Transports {
66 get { return _transports.Values; }