}
};
}
public static BackupReceiverRepositoryWrapper replaceInCache(CacheContainer cacheContainer, BackupListener listener) {
BackupReceiverRepository delegate = extractGlobalComponent(cacheContainer, BackupReceiverRepository.class);
BackupReceiverRepositoryWrapper wrapper = new BackupReceiverRepositoryWrapper(delegate, listener);
replaceComponent(cacheContainer, BackupReceiverRepository.class, wrapper, true);
JGroupsTransport t = (JGroupsTransport) extractGlobalComponent(cacheContainer, Transport.class);
CommandAwareRpcDispatcher card = t.getCommandAwareRpcDispatcher();
replaceField(wrapper, "backupReceiverRepository", card, CommandAwareRpcDispatcher.class);