Beispiel #1
0
        public static void GenerateWCFSoapChannel(PullChannelConfig cfg)
        {
            if (cfg == null)
            {
                return;
            }

            cfg.RPCConfig     = new RPCChannelConfig();
            cfg.RPCConfig.URI = string.Format("http://localhost:{0}/{1}_{2}", GeneratePortNumber(), cfg.SenderEntityName, cfg.ReceiverEntityName);

            cfg.LPCConfig = null;
        }
Beispiel #2
0
        public void RegisterChannel(PullChannelConfig channel)
        {
            PullReceiverBase receiver = PullHelper.CreatePullReceiver(channel, _log);

            if (receiver == null)
            {
                return;
            }

            receiver.OnMessageReceived += new PullMessageReceivedHandler(receiver_OnMessageReceived);
            _channels.Add(receiver);
        }
Beispiel #3
0
        public static void GenerateWCFNamedPipeChannel(PullChannelConfig cfg)
        {
            if (cfg == null)
            {
                return;
            }

            cfg.RPCConfig     = new RPCChannelConfig();
            cfg.RPCConfig.URI = string.Format("net.pipe://localhost/{0}_{1}", cfg.SenderEntityName, cfg.ReceiverEntityName);

            cfg.LPCConfig = null;
        }
Beispiel #4
0
        public static void GenerateLPCChannel(PullChannelConfig cfg)
        {
            if (cfg == null)
            {
                return;
            }

            cfg.LPCConfig = new LPCChannelConfig();
            cfg.LPCConfig.SenderEntityID   = cfg.SenderEntityID;
            cfg.LPCConfig.ReceiverEntityID = cfg.ReceiverEntityID;

            cfg.RPCConfig = null;
        }
Beispiel #5
0
        public static PullReceiverBase CreatePullReceiver(PullChannelConfig config, ILog log)
        {
            if (config == null)
            {
                return(null);
            }

            switch (config.ProtocolType)
            {
            case ProtocolType.RPC_NamedPipe:
            case ProtocolType.RPC_TCP:
            case ProtocolType.RPC_SOAP:
                return(new RPCPullReceiver(config, log));

            case ProtocolType.LPC:
                return(new LPCQueryReceiver(config, log));
            }

            return(null);
        }
Beispiel #6
0
        public void RegisterChannel(PullChannelConfig channel)
        {
            PullSenderBase sender = PullHelper.CreatePullSender(channel, _log);

            _channels.Add(sender);
        }
Beispiel #7
0
 public PullReceiverBase(PullChannelConfig config, ILog log)
 {
     _log    = log;
     Channel = config;
 }
Beispiel #8
0
 public PullSenderBase(PullChannelConfig config, ILog log)
 {
     _log    = log;
     Channel = config;
 }