Beispiel #1
0
        public static Engine Create(string gatewayUrl, IdInfo idInfo, UserControl uiControl)
        {
            Engine engine = Create(gatewayUrl, idInfo);

            engine.UiControl = uiControl;
            return(engine);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WeborbClient"/> class with the WebORB URL, destination name and an instance of UserControl.
        /// </summary>
        /// <param name="gatewayURL">The gateway URL - must be a valid URL of a WebORB
        /// installation. For instance, the gateway URL for the default installation
        /// of WebORB for .NET is http://localhost/weborb30/weborb.aspx</param>
        /// <param name="destination">The destination name - must be a valid destination
        /// name configured in remoting-config.xml</param>
        /// <param name="uiControl">A UI control used by the <see cref="WeborbClient"/> instance to execute callbacks into the UI thread. The argument can be null.</param>
        /// <remarks>For the instances of WeborbClient created with this constructor, invocations using the Invoke method
        /// do not require class name, unless the destination argument is a generic destination.</remarks>
        public WeborbClient(String gatewayURL, String destination, UserControl uiControl)
        {
            IdInfo             = new IdInfo();
            IdInfo.Destination = destination;
            this.uiControl     = uiControl;

            if (desiredEngine != null)
            {
                _engine = desiredEngine;
            }
            else
            {
                _engine = Engine.Create(gatewayURL, IdInfo, uiControl);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WeborbClient"/> class with the WebORB URL and a destination name.
        /// </summary>
        /// <param name="gatewayURL">The gateway URL - must be a valid URL of a WebORB
        /// installation. For instance, the gateway URL for the default installation
        /// of WebORB for .NET is http://localhost/weborb4/weborb.aspx</param>
        /// <param name="destination">The destination name - must be a valid destination
        /// name configured in WEB-INF/flex/remoting-config.xml</param>
        /// <param name="timeout">Timeout is the number of milliseconds to wait before the request times out</param>
        /// <remarks>For the instances of WeborbClient created with this constructor, invocations using the Invoke method
        /// do not require class name, unless the destination argument is a generic destination.</remarks>
        public WeborbClient(String gatewayURL, String destination, int timeout)
        {
            IdInfo             = new IdInfo();
            IdInfo.Destination = destination;

            if (desiredEngine != null)
            {
                _engine = desiredEngine;
            }
            else
            {
                _engine = Engine.Create(gatewayURL, IdInfo);
            }

            _engine.Timeout = timeout;
        }
Beispiel #4
0
        public static Engine Create(string gatewayUrl, IdInfo idInfo)
        {
            if (gatewayUrl.StartsWith("http://") || gatewayUrl.StartsWith("https://"))
            {
                return(new HttpEngine(gatewayUrl, idInfo));
            }
#if !UNIVERSALW8 && !PURE_CLIENT_LIB && !WINDOWS_PHONE8
            if (gatewayUrl.StartsWith("rtmpt://"))
            {
                return(new RtmptEngine(gatewayUrl, idInfo));
            }
#endif
#if (!UNIVERSALW8 && !WINDOWS_PHONE && !PURE_CLIENT_LIB && !WINDOWS_PHONE8)
            if (gatewayUrl.StartsWith("rtmp://"))
            {
                return(new RtmpEngine(gatewayUrl, idInfo));
            }
#endif

            throw new ArgumentOutOfRangeException("gatewayUrl", "Unsupported URI scheme in the gateway URL.");
        }
Beispiel #5
0
 internal Engine(string gateway, IdInfo idInfo)
 {
     GatewayUrl = gateway;
     IdInfo     = idInfo.MemberwiseClone();
 }
Beispiel #6
0
        public static void InitCommandMessage(CommandMessage message, String subTopic, String selector, IdInfo idInfo, string clientId)
        {
            message.destination = idInfo.Destination;
            message.clientId    = clientId;
            Dictionary <String, String> headers = new Dictionary <String, String>();

            headers.Add("DSId", idInfo.DsId);

            if (selector != null)
            {
                headers.Add(CommandMessage.DSSELECTOR, selector);
            }

            if (subTopic != null)
            {
                headers.Add("DSSubtopic", subTopic);
            }

            message.headers = headers;
        }
Beispiel #7
0
 public HttpEngine(string url, IdInfo idInfo) : base(url, idInfo)
 {
 }