// Constructor.
		public SinkStackEntry(IServerChannelSink sink, Object state,
							  SinkStackEntry below)
				{
					this.sink = sink;
					this.state = state;
					this.below = below;
				}
		public SoapServerFormatterSink (SoapServerFormatterSink.Protocol protocol,
						IServerChannelSink nextSink,
						IChannelReceiver receiver)
		{
			this.next_sink = nextSink;
			_receiver = receiver;
		}
Example #3
0
 public BidirTcpServerTransportSink(IServerChannelSink nextSink, int port, String IPAddress)
 {
     _port = port;
     _IPAddress = IPAddress;
     _nextSink = nextSink;
     // StartListening();
 }
		public BinaryServerFormatterSink (BinaryServerFormatterSink.Protocol protocol,
						  IServerChannelSink nextSink,
						  IChannelReceiver receiver)
		{
			this.protocol = protocol;
			this.next_sink = nextSink;
			this.receiver = receiver;
		}
Example #5
0
        /// <summary>Erstellt eine neue Instanz von CounterServerChannelSink.</summary>
        /// <param name="nextSink">Nächste Kanalsenke in der Senkenkette</param>
        public CounterServerChannelSink(IServerChannelSink nextSink)
        {
            //Lock objekt erstellen
            _lockObject = new object();

            // Nächste Kanalsenke übernehmen
            _next = nextSink;
        }
Example #6
0
 public HathiServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel)
 {
     IServerChannelSink nextServer = (IServerChannelSink)new BinaryServerFormatterSink(
                                                                         BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel);
     if (channel != null) m_channel = channel;
     if (Provider != null) m_Provider = Provider as HathiServerSinkProvider;
     m_NextIServerChannelSink = new HathiServerChannelSink(Provider, channel, nextServer);
 }
		public ServerTransportSink(IServerChannelSink nextSink)
		{
			// parameters validation
			if (nextSink == null)
				throw new ArgumentNullException("nextSink");

			_nextSink = nextSink;
		}
        public IpFixServerChannelSink(IServerChannelSink nextSink, IEventLink eventLink)
        {
            if (nextSink == null) 
                throw new ArgumentNullException("nextSink");

            _nextSink = nextSink;
            _eventLink = eventLink;
        }
 /// <summary>
 /// Constructor with properties.
 /// </summary>
 /// <param name="nextSink">Next sink.</param>
 /// <param name="compressionThreshold">Compression threshold. If 0, compression is disabled globally.</param>
 public CompressionServerChannelSink(
     IServerChannelSink nextSink,
     int compressionThreshold)
 {
     // Set the next sink.
     _next = nextSink;
     // Set the compression threshold.
     _compressionThreshold = compressionThreshold;
 }
 public SoapServerFormatterSink(Protocol protocol, IServerChannelSink nextSink, IChannelReceiver receiver)
 {
     if (receiver == null)
     {
         throw new ArgumentNullException("receiver");
     }
     this._nextSink = nextSink;
     this._protocol = protocol;
     this._receiver = receiver;
 }
        public ServerFormatterSink(IWireFormatter formatter, IServerChannelSink nextSink)
        {
            // parameters validation
            if (formatter == null)
                throw new ArgumentNullException("formatter");
            if (nextSink == null)
                throw new ArgumentNullException("nextSink");

            _formatter = formatter;
            _nextSink = nextSink;
        }
Example #12
0
		public CompressionServerSink(
			IServerChannelSink nextChannelSink_in,
			bool mustDo_in
		) {
#if DEBUG
			Console.WriteLine("initiating compression sink");
#endif

			this.mustdo_ = mustDo_in;
			this.nextchannelsink_ = nextChannelSink_in;
		} 
Example #13
0
 public HathiServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel, object nextobject)
 {
     if (channel != null) m_channel = channel;
     if (Provider != null) m_Provider = Provider as HathiServerSinkProvider;
     if (nextobject != null)
     {
         m_NextIServerChannelSink = nextobject as IServerChannelSink;
         if (m_NextIServerChannelSink == null)
             m_NextIServerChannelSink = new BinaryServerFormatterSink(
                     BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel);
     }
 }
        public SecureServerChannelSink(IServerChannelSink nextSink, string algorithm, double connectionAgeLimit, double sweeperFrequency, bool requireSecurity)
        {
            _algorithm = algorithm;
            _connectionAgeLimit = connectionAgeLimit;
            _sweepFrequency = sweeperFrequency;
            _requireSecurity = requireSecurity;

            _next = nextSink;

            _connections = new Hashtable(103, 0.5F);
            StartConnectionSweeper();
        }
		public object Pop (IServerChannelSink sink)
		{
			// Pops until the sink is found

			while (_sinkStack != null)
			{
				ChanelSinkStackEntry stackEntry = _sinkStack;
				_sinkStack = _sinkStack.Next;
				if (stackEntry.Sink == sink) return stackEntry.State;
			}
			throw new RemotingException ("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
		}
		public EncryptionServerSink(
			IServerChannelSink nextChannelSink_in,
			string keysPath_in, 
			bool mustDo_in
		) {
#if DEBUG
			Console.WriteLine("initiating encryption sink");
#endif

			keyspath_ = keysPath_in;
			mustdo_ = mustDo_in;
			nextchannelsink_ = nextChannelSink_in;
		} 
Example #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CryptoServerChannelSink"/> class.
        /// </summary>
        /// <param name="nextSink">The next sink.</param>
        /// <param name="algorithm">Symmetric encryption algorithm.</param>
        /// <param name="oaep">if set to <c>true</c>, OAEP padding is enabled.</param>
        /// <param name="connectionAgeLimit">Connection age limit.</param>
        /// <param name="sweeperFrequency">Connection sweeper frequency.</param>
        /// <param name="requireCryptoClient">if set to <c>true</c>, crypto client sink is required.</param>
        /// <param name="securityExemptionList">Security exemption list.</param>
        public CryptoServerChannelSink(IServerChannelSink nextSink, string algorithm, bool oaep, double connectionAgeLimit, double sweeperFrequency, bool requireCryptoClient, IPAddress[] securityExemptionList)
        {
            _algorithm = algorithm;
            _oaep = oaep;
            _connectionAgeLimit = connectionAgeLimit;
            _sweepFrequency = sweeperFrequency;
            _requireCryptoClient = requireCryptoClient;
            _securityExemptionList = securityExemptionList;
            _next = nextSink;
            _connections = new Hashtable(103, 0.5F);

            StartConnectionSweeper();
        }
Example #18
0
        /// <summary>Erstellt eine neue Instanz von CryptoServerChannelSink.</summary>
        /// <param name="nextSink">Nächste Kanalsenke in der Senkenkette</param>
        /// <param name="algorithm">Name des symmetrischen Verschlüsselungsalgorithmus</param>
        /// <param name="oaep">Gibt an, ob OAEP-Padding verwendet werden soll, oder nicht</param>
        /// <param name="connectionAgeLimit">Lebenszeit einer Client-Verbindung in Sekunden</param>
        /// <param name="sweeperFrequency">Intervall des Aufräumvorgangs in Sekunden</param>
        /// <param name="requireCryptoClient">Gibt an, ob clientseitig eine Kanalsenke für verschlüsselte Kommunikation vorhanden sein muss</param>
        /// <param name="securityExemptionList">IP-Adressen Ausnahmeliste</param>
        public CryptoServerChannelSink(IServerChannelSink nextSink, string algorithm, bool oaep, double connectionAgeLimit, double sweeperFrequency, bool requireCryptoClient, IPAddress[] securityExemptionList)
        {
            // Werte übernehmen
            _algorithm = algorithm;
            _oaep = oaep;
            _connectionAgeLimit = connectionAgeLimit;
            _sweepFrequency = sweeperFrequency;
            _requireCryptoClient = requireCryptoClient;
            _securityExemptionList = securityExemptionList;

            // Nächste Kanalsenke übernehmen
            _next = nextSink;

            // Verbindungs-Auflistung erzeugen
            _connections = new Hashtable(103, 0.5F);

            // Aufräumvorgang einrichten
            StartConnectionSweeper();
        }
 public object Pop(IServerChannelSink sink)
 {
     if (this._stack == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack"));
     }
 Label_0018:
     if (this._stack.Sink != sink)
     {
         this._stack = this._stack.PrevStack;
         if (this._stack != null)
         {
             goto Label_0018;
         }
     }
     if (this._stack.Sink == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
     }
     object state = this._stack.State;
     this._stack = this._stack.PrevStack;
     return state;
 }
Example #20
0
 /// <summary>
 /// Constructor with properties.
 /// </summary>
 /// <param name="nextSink">Next sink.</param>
 /// <param name="compressionThreshold">Compression threshold. If 0, compression is disabled globally.</param>
 /// <param name="compressionMethod">The compression method.</param>
 public CompressionServerChannelSink(IServerChannelSink nextSink, int compressionThreshold, CompressionMethod compressionMethod)
 {
     _next = nextSink;
     _compressionThreshold = compressionThreshold;
     _compressionMethod    = compressionMethod;
 }
 public MyServerChannelSink(IChannelReceiver channel,
                            IServerChannelSink nextSink) : base()
 {
     nextServerSink = nextSink;
 }
Example #22
0
 public void StoreAndDispatch(IServerChannelSink sink, object state)
 {
     throw new NotImplementedException();
 }
Example #23
0
 public UnixServerTransportSink(IServerChannelSink next)
 {
     next_sink = next;
 }
Example #24
0
 //constructors
 //
 public XmlRpcServerFormatterSink(
     IServerChannelSink Next)
 {
     m_next = Next;
 }
 public SdlChannelSink(IChannelReceiver receiver, IServerChannelSink nextSink)
 {
     _receiver = receiver;
     _nextSink = nextSink;
 } // SdlChannelSink
Example #26
0
		public SdlChannelSink (IChannelReceiver receiver, IServerChannelSink nextSink)
		{
			_next = nextSink;
			_channel = receiver;
		}
Example #27
0
 /// <summary>
 /// Creates an instance of the GenuineTcpServerTransportSink class.
 /// </summary>
 /// <param name="channel">The parent channel.</param>
 /// <param name="nextChannelSink">The next channel sink for futher processing.</param>
 /// <param name="iTransportContext">The Transport Context.</param>
 public GenuineUniversalServerTransportSink(BasicChannelWithSecurity channel, IServerChannelSink nextChannelSink, ITransportContext iTransportContext)
 {
     this.ITransportContext = iTransportContext;
     this._channel          = channel;
     this._nextChannelSink  = nextChannelSink;
 }
Example #28
0
 public IpcServerChannelSink(IServerChannelSink nextSink, string portName, bool impersonate) 
 {
     this.nextSink = nextSink;
     this.portName = portName;
     this.impersonate = impersonate;
 }
 /// <summary>
 /// Constructor with properties.
 /// </summary>
 /// <param name="nextSink">Next sink.</param>
 /// <param name="compressionThreshold">Compression threshold. If 0, compression is disabled globally.</param>
 /// <param name="compressionMethod">The compression method.</param>
 public CompressionServerChannelSink(IServerChannelSink nextSink, int compressionThreshold, CompressionMethod compressionMethod)
 {
     _next = nextSink;
     _compressionThreshold = compressionThreshold;
     _compressionMethod = compressionMethod;
 }
 public EncryptionServerSink(IServerChannelSink next, byte[] encryptionKey, String encryptionAlgorithm)
 {
     _encryptionKey       = encryptionKey;
     _encryptionAlgorithm = encryptionAlgorithm;
     _nextSink            = next;
 }
 public ObservableServerChannelSink(CurrentMessageCounter currentMessageCounter, IServerChannelSink next)
 {
     if (next == null)
     {
         throw new ArgumentNullException(nameof(next));
     }
     _currentMessageCounter = currentMessageCounter;
     _next = next;
 }
Example #32
0
 public ClientAddressServerChannelSink(IServerChannelSink next)
 {
     _nextSink = next;
 }
 public void StoreAndDispatch(IServerChannelSink sink, object state)
 {
     this.Store(sink, state);
     this.FlipRememberedStack();
     CrossContextChannel.DoAsyncDispatch(this._asyncMsg, null);
 }
 public PolicyServerSink(
     IChannelReceiver receiver, IServerChannelSink nextSink)
 {
     NextChannelSink = nextSink;
 }
Example #35
0
 public HttpServerTransportSink(IServerChannelSink nextSink)
 {
     this.nextSink = nextSink;
 }
Example #36
0
        public Object Pop(IServerChannelSink sink)
        { 
            if (_stack == null)
            {
                throw new RemotingException(
                    Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack")); 
            }
 
            // find this sink on the stack 
            do
            { 
                if (_stack.Sink == sink)
                    break;

                _stack = _stack.PrevStack; 
            } while (_stack != null);
 
            if (_stack.Sink == null) 
            {
                throw new RemotingException( 
                    Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
            }

            Object state = _stack.State; 
            _stack = _stack.PrevStack;
 
            return state; 
        } // Pop
Example #37
0
 internal IiopServerFormatterSink(IServerChannelSink nextSink,
                                  GiopMessageHandler messageHandler)
 {
     m_nextSink       = nextSink;
     m_messageHandler = messageHandler;
 }
Example #38
0
        [System.Security.SecurityCritical]  // auto-generated 
        public void StoreAndDispatch(IServerChannelSink sink, Object state)
        {
            Store(sink, state);
            FlipRememberedStack(); 

            CrossContextChannel.DoAsyncDispatch(_asyncMsg, null); 
        } // Store 
Example #39
0
 public HashServerChannelSink(IServerChannelSink nextSink) : base()
 {
     _nextSink = nextSink;
 }
Example #40
0
 public SdlChannelSink(IChannelReceiver receiver, IServerChannelSink nextSink)
 {
     _next    = nextSink;
     _channel = receiver;
 }
Example #41
0
 public void Push(IServerChannelSink sink, object state)
 {
     _sinkStack = new ChanelSinkStackEntry(sink, state, _sinkStack);
 }
Example #42
0
 public HttpServerTransportSink(IServerChannelSink nextSink)
 {
     _nextSink = nextSink;
 } // IServerChannelSink
Example #43
0
        void BuildSink(IServerChannelSinkProvider sinkProvider)
        {
            //resolve names (modified from TcpChannel)
            if (machineName == null)
            {
                if (useIPAddress)
                {
                    if (!bindAddress.Equals(IPAddress.Any))
                    {
                        machineName = bindAddress.ToString();
                    }
                    else
                    {
                        IPHostEntry hostEntry = Dns.Resolve(Dns.GetHostName());
                        if (hostEntry.AddressList.Length == 0)
                        {
                            throw new RemotingException("IP address could not be determined for this host");
                        }
                        // We DON'T want to take the resolved address from the hostEntry, since the socket
                        // should still bind to IPAddress.Any, so that we get the loopback too
                        machineName = hostEntry.AddressList[0].ToString();
                    }
                }
                else
                {
                    IPHostEntry hostEntry = Dns.GetHostByName(Dns.GetHostName());
                    bindAddress = hostEntry.AddressList[0];
                    machineName = hostEntry.HostName;
                }
            }

            if (sinkProvider == null)
            {
                //build a default chain that can handle wsdl, soap, binary
                sinkProvider           = new SdlChannelSinkProvider();        //for wsdl
                sinkProvider.Next      = new SoapServerFormatterSinkProvider();
                sinkProvider.Next.Next = new BinaryServerFormatterSinkProvider();
            }

            //MS compat: channelData is null when port < 0
            if (port >= 0)
            {
                channelData = new ChannelDataStore(null);
                IServerChannelSinkProvider provider = sinkProvider;
                while (provider != null)
                {
                    provider.GetChannelData(channelData);
                    provider = provider.Next;
                }
            }

            //create the sink chain and add an HTTP sink
            IServerChannelSink nextSink = ChannelServices.CreateServerChannelSinkChain(sinkProvider, this);

            sink = new HttpServerTransportSink(nextSink);

            // BaseChannelWithProperties wants this to be set with the chain
            base.SinksWithProperties = nextSink;

            StartListening(null);
        }
Example #44
0
 public IiopServerTransportSink(IServerChannelSink nextSink)
 {
     m_nextSink = nextSink; // this is the first sink in the server chain, set next sink
 }
Example #45
0
 public ServerTransportSink(IServerChannelSink nextSink)
 {
     this._nextSink = nextSink;
 }
Example #46
0
 public CryptoServerChannelSink(IServerChannelSink nextSink) : base()
 {
     _nextSink = nextSink;
 }
 internal TcpServerTransportSink(IServerChannelSink nextSink, bool impersonate)
 {
     _nextSink    = nextSink;
     _impersonate = impersonate;
 } // TcpServerTransportSink
 public MyServerChannelSink(IServerChannelSink nextSink) : base()
 {
     nextServerSink = nextSink;
 }
 public IpcServerTransportSink(IServerChannelSink nextSink, bool secure, bool impersonate) 
 {
     _nextSink = nextSink;
     _secure = secure;
     _impersonate = impersonate; 
  } // IpcServerTransportSink
Example #50
0
 public MSMQServerTransportSink(IServerChannelSink next)
 {
     m_next = next;
 }
 public SdlChannelSink(IChannelReceiver receiver, IServerChannelSink nextSink)
 {
     _receiver = receiver;
     _nextSink = nextSink;
 } // SdlChannelSink
Example #52
0
        public Receiver(IDictionary properties, IServerChannelSinkProvider serverSinkProvider)
        {
            // administratively setup using the config values
            // static knowledge base
            ChannelName = properties.Contains(MSMQChannelProperties.ChannelName) ?
                          Convert.ToString(properties[MSMQChannelProperties.ChannelName]) : MSMQChannelDefaults.ChannelName;
            ChannelPriority = properties.Contains(MSMQChannelProperties.ChannelPriority) ?
                              Convert.ToInt32(properties[MSMQChannelProperties.ChannelPriority]) : MSMQChannelDefaults.ChannelPriority;
            ListenerPath = properties.Contains(MSMQChannelProperties.Listener) ?
                           Convert.ToString(properties[MSMQChannelProperties.Listener]) : MSMQChannelDefaults.QueuePath;
            AllowToUpdate = properties.Contains(MSMQChannelProperties.UpdateKB) ?
                            Convert.ToBoolean(properties[MSMQChannelProperties.UpdateKB]) : MSMQChannelDefaults.CanBeUpdated;

            // dynamically knowledge base
            NotifyTime = properties.Contains(MSMQChannelProperties.NotifyTime) ?
                         Convert.ToInt32(properties[MSMQChannelProperties.NotifyTime]) : MSMQChannelDefaults.TimeoutInSec;
            RetryTime = properties.Contains(MSMQChannelProperties.RetryTime) ?
                        Convert.ToInt32(properties[MSMQChannelProperties.RetryTime]) : MSMQChannelDefaults.TimeoutInSec;
            RetryCounter = properties.Contains(MSMQChannelProperties.Retry) ?
                           Convert.ToInt32(properties[MSMQChannelProperties.Retry]) : MSMQChannelDefaults.RetryCounter;
            RetryFilter = properties.Contains(MSMQChannelProperties.RetryFilter) ?
                          Convert.ToString(properties[MSMQChannelProperties.RetryFilter]) : MSMQChannelDefaults.EmptyStr;
            NotifyUrl = properties.Contains(MSMQChannelProperties.NotifyUrl) ?
                        Convert.ToString(properties[MSMQChannelProperties.NotifyUrl]) : MSMQChannelDefaults.EmptyStr;
            AcknowledgeUrl = properties.Contains(MSMQChannelProperties.AckUrl) ?
                             Convert.ToString(properties[MSMQChannelProperties.AckUrl]) : MSMQChannelDefaults.EmptyStr;
            ExceptionUrl = properties.Contains(MSMQChannelProperties.ExceptionUrl) ?
                           Convert.ToString(properties[MSMQChannelProperties.ExceptionUrl]) : MSMQChannelDefaults.EmptyStr;
            UseTimeout = properties.Contains(MSMQChannelProperties.UseTimeout) ?
                         Convert.ToBoolean(properties[MSMQChannelProperties.UseTimeout]) : MSMQChannelDefaults.UseTimeout;
            // validate number of threads
            MaxNumberOfWorkers = MSMQChannelDefaults.MaxThreads;
            if (properties.Contains(MSMQChannelProperties.MaxThreads))
            {
                string maxthreads = Convert.ToString(properties[MSMQChannelProperties.MaxThreads]);
                Update(MSMQChannelProperties.MaxThreads, maxthreads);
            }

            // channel provider
            m_Provider = serverSinkProvider == null ? new BinaryServerFormatterSinkProvider() : serverSinkProvider;

            /*
             * // Collect the rest of the channel data:
             * IServerChannelSinkProvider provider = m_Provider;
             * while(provider != null)
             * {
             *      provider.GetChannelData(_data);
             *      provider = provider.Next;
             * }
             */

            IServerChannelSink next = ChannelServices.CreateServerChannelSinkChain(m_Provider, this);

            m_Sink = new MSMQServerTransportSink(next);

            // publish the MSMQChannel endpoint using the channel name.
            base.Publish(ChannelName);

            // start Listener
            StartListening(null);
        }
Example #53
0
 public UdpServerChannelSink(IServerChannelSink next)
 {
     NextChannelSink = next;
 }
        //---------------------- Constructors -----------------------------------//

        public ClientIpServerSink(IServerChannelSink next)
        {
            _nextSink = next;
        }
Example #55
0
 public void Push(IServerChannelSink sink, Object state) 
 { 
     SinkStack newStack = new SinkStack();
     newStack.PrevStack = _stack; 
     newStack.Sink = sink;
     newStack.State = state;
     _stack = newStack;
 } // Push 
Example #56
0
 // used on the client side
 public BidirTcpServerTransportSink(IServerChannelSink nextSink)
 {
     _nextSink = nextSink;
 }
Example #57
0
        [System.Security.SecurityCritical]  // auto-generated
        public void Store(IServerChannelSink sink, Object state)
        { 
            if (_stack == null)
            { 
                throw new RemotingException( 
                    Environment.GetResourceString(
                        "Remoting_Channel_StoreOnEmptySinkStack")); 
            }

            // find this sink on the stack
            do 
            {
                if (_stack.Sink == sink) 
                    break; 

                _stack = _stack.PrevStack; 
            } while (_stack != null);

            if (_stack.Sink == null)
            { 
                throw new RemotingException(
                    Environment.GetResourceString("Remoting_Channel_StoreOnSinkStackWithoutPush")); 
            } 

            SinkStack remStack = new SinkStack(); 
            remStack.PrevStack = _rememberedStack;
            remStack.Sink = sink;
            remStack.State = state;
            _rememberedStack = remStack; 

            Pop(sink); 
        } // Store 
Example #58
0
 public IceServerFormatterSink(IServerChannelSink next)
 {
     _next = next;
 }
        public BinaryServerFormatterSink(Protocol protocol, IServerChannelSink nextSink,
                                         IChannelReceiver receiver)
        {
            if (receiver == null)
                throw new ArgumentNullException("receiver");

            _nextSink = nextSink;
            _protocol = protocol;
            _receiver = receiver;            
        } // BinaryServerFormatterSinkProvider
Example #60
0
 public ServerChannelSink(IServerChannelSink iServerChannelSink)
 {
     _iServerChannelSink = iServerChannelSink;
 }