Example #1
0
 public IRemoteObserver GetRemoteObserver(Connection c, int a, int b)
 {
     lock (_mutex)
     {
         if (remoteObserver == null)
         {
             remoteObserver = new RemoteObserver();
             remoteObserver.Reset();
         }
         return(remoteObserver);
     }
 }
Example #2
0
 GetRemoteObserver(Ice.ConnectionInfo c, Ice.Endpoint e, int a, int b)
 {
     lock (this)
     {
         if (remoteObserver == null)
         {
             remoteObserver = new RemoteObserver();
             remoteObserver.reset();
         }
         return(remoteObserver);
     }
 }
Example #3
0
 GetRemoteObserver(Connection c, int a, int b)
 {
     lock (this)
     {
         if (remoteObserver == null)
         {
             remoteObserver = new RemoteObserver();
             remoteObserver.reset();
         }
         return(remoteObserver);
     }
 }
Example #4
0
            public RemoteObserver Subscribe(IWampClientProxy <TMessage> client)
            {
                Subscription subscription;

                if (!mSessionIdToSubscription.TryGetValue(client.Session, out subscription))
                {
                    RemoteObserver result = new RemoteObserver(client);

                    ImmutableHashSetInterlocked.Add(ref mRemoteObservers, result);

                    subscription = new Subscription(mRawTopic, client, result);

                    ImmutableInterlocked.TryAdd(ref mSessionIdToSubscription, client.Session, subscription);

                    subscription.Open();
                }

                return(subscription.Observer);
            }
Example #5
0
        public void Subscribe(ISubscribeRequest <TMessage> request, SubscribeOptions options)
        {
            RemoteWampTopicSubscriber remoteSubscriber =
                new RemoteWampTopicSubscriber(this.SubscriptionId,
                                              request.Client as IWampSubscriber);

            IWampClientProxy <TMessage> client = request.Client;

            RemoteObserver observer = mSubscriberBook.Subscribe(client);

            if (!observer.IsOpen)
            {
                this.RaiseSubscriptionAdding(remoteSubscriber, options);
            }

            request.Subscribed(this.SubscriptionId);

            if (!observer.IsOpen)
            {
                observer.Open();

                this.RaiseSubscriptionAdded(remoteSubscriber, options);
            }
        }
Example #6
0
 protected bool Equals(RemoteObserver other)
 {
     return((ReferenceEquals(mClient, other.mClient)) ||
            mSessionId == other.mSessionId);
 }
Example #7
0
 public Subscription(WampRawTopic <TMessage> parent, IWampClientProxy <TMessage> client, RemoteObserver observer)
 {
     mParent   = parent;
     mClient   = client;
     mObserver = observer;
 }