Ejemplo n.º 1
0
  /** {@inheritDoc} */
  public void operational(final ConnectionEvent e) {
    // ... forward the new connection state
    doForwardConnectionStateChange(ConnectionState.translate(e.getState()));

    // ... forward initial values
    updateCharacteristicListeners();
  }
Ejemplo n.º 2
0
  /**
   * Sets the DAL property, this connector is connected to.
   *
   * @param dalProperty the DAL property
   */
  private void setDalProperty(DynamicValueProperty dalProperty) {
    if (_dalProperty != null) {
      _dalProperty.removeDynamicValueListener(this);
      _dalProperty.removePropertyChangeListener(this);
      _dalProperty.removeLinkListener(this);
    }

    _dalProperty = dalProperty;

    if (_dalProperty != null) {
      _dalProperty.addDynamicValueListener(this);

      _dalProperty.addPropertyChangeListener(this);

      // we add a LinkListener to get informed of connection state changes
      _dalProperty.addLinkListener(this);

      // send initial connection state
      forwardConnectionState(ConnectionState.translate(_dalProperty.getConnectionState()));
    }
  }
Ejemplo n.º 3
0
 private void forwardConnectionEvent(ConnectionEvent e) {
   doForwardConnectionStateChange(ConnectionState.translate(e.getState()));
 }
Ejemplo n.º 4
0
 /** {@inheritDoc} */
 public void connectionFailed(ConnectionEvent e) {
   doForwardConnectionStateChange(ConnectionState.translate(e.getState()));
 }