private void registerSender(final InnerSender innerSender, final SystemObject systemObject) {
   try {
     if (innerSender.getSenderRole() != SenderRole.source()) {
       // Quellen werden verzögert beim ersten Datensatz angemeldet
       _connection.subscribeSender(
           innerSender,
           systemObject,
           innerSender.getDataDescription(),
           innerSender.getSenderRole());
     }
   } catch (OneSubscriptionPerSendData oneSubscriptionPerSendData) {
     _manager.addMessage(
         Message.newMajor("Kann nicht als Sender anmelden", oneSubscriptionPerSendData));
   }
 }
  private synchronized void setWrappedObject(final SystemObject wrappedObject) {
    if (_wrappedObject == wrappedObject) return;

    _wrappedObject = wrappedObject;
    if (wrappedObject != null) {
      for (final InnerReceiver receiver : _receivers.values()) {
        if (checkType(wrappedObject.getType(), receiver.getDataDescription().getAttributeGroup())) {
          registerReceiver(receiver, wrappedObject);
        }
      }
      for (final InnerSender sender : _senders.values()) {
        if (checkType(wrappedObject.getType(), sender.getDataDescription().getAttributeGroup())) {
          registerSender(sender, wrappedObject);
        }
      }
      for (final ExistenceListener listener : _existenceListeners) {
        listener.objectCreated(this);
      }
    } else {
      for (final ExistenceListener listener : _existenceListeners) {
        listener.objectInvalidated(this);
      }
    }
  }
 /**
  * Meldet einen Sender ab
  *
  * @param senderObject Sender-Objekt
  */
 public void unsubscribeSender(final KExDaVSender senderObject) {
   final InnerSender sender = _senders.remove(senderObject);
   final SystemObject systemObject = getWrappedObject();
   if (systemObject == null) return;
   _connection.unsubscribeSender(sender, systemObject, sender.getDataDescription());
 }