public IRemoteObserver GetRemoteObserver(Connection c, int a, int b) { lock (_mutex) { if (remoteObserver == null) { remoteObserver = new RemoteObserver(); remoteObserver.Reset(); } return(remoteObserver); } }
GetRemoteObserver(Ice.ConnectionInfo c, Ice.Endpoint e, int a, int b) { lock (this) { if (remoteObserver == null) { remoteObserver = new RemoteObserver(); remoteObserver.reset(); } return(remoteObserver); } }
GetRemoteObserver(Connection c, int a, int b) { lock (this) { if (remoteObserver == null) { remoteObserver = new RemoteObserver(); remoteObserver.reset(); } return(remoteObserver); } }
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); }
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); } }
protected bool Equals(RemoteObserver other) { return((ReferenceEquals(mClient, other.mClient)) || mSessionId == other.mSessionId); }
public Subscription(WampRawTopic <TMessage> parent, IWampClientProxy <TMessage> client, RemoteObserver observer) { mParent = parent; mClient = client; mObserver = observer; }