コード例 #1
0
  /* (non-Javadoc)
   * @see org.csstudio.dal.impl.SimplePropertyImpl#initialize(org.csstudio.dal.proxy.PropertyProxy, org.csstudio.dal.proxy.DirectoryProxy)
   */
  @Override
  public void initialize(PropertyProxy<T, ?> proxy, DirectoryProxy<?> dirProxy) {
    if (this.proxy != null) {
      this.proxy.removeProxyListener(proxyListener);
      if (this.directoryProxy != null && this.directoryProxy != this.proxy) {
        this.directoryProxy.removeProxyListener(proxyListener);
      }
    } else {
      setConnectionState(ConnectionState.CONNECTING, null);
    }

    super.initialize(proxy, dirProxy);

    // if proxy already has some value, it shoudl share
    Response<T> res = proxy.getLatestValueResponse();
    if (res != null) {
      updateLastValueCache(res, res.success(), true);
    }

    if (proxy != null) {
      proxy.addProxyListener(proxyListener);
      if (dirProxy != null && dirProxy != proxy) {
        dirProxy.addProxyListener(proxyListener);
      }
    }
  }
コード例 #2
0
 /*
  * (non-Javadoc)
  * @see org.csstudio.dal.impl.SimplePropertyImpl#addDynamicValueListener(org.csstudio.dal.DynamicValueListener)
  */
 @Override
 public <P extends SimpleProperty<T>> void addDynamicValueListener(DynamicValueListener<T, P> l) {
   super.addDynamicValueListener(l);
 }