All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.eureka2.channel.TestRegistrationChannel Maven / Gradle / Ivy

The newest version!
package com.netflix.eureka2.channel;

import com.netflix.eureka2.registry.instance.InstanceInfo;
import rx.Observable;

/**
 * @author David Liu
 */
public class TestRegistrationChannel extends TestChannel implements RegistrationChannel {
    public volatile boolean hasUnregistered;

    public TestRegistrationChannel(RegistrationChannel delegate, Integer id) {
        super(delegate, id);
        this.hasUnregistered = false;
    }

    @Override
    public Observable register(InstanceInfo instanceInfo) {
        operations.add(instanceInfo);
        return delegate.register(instanceInfo);
    }

    @Override
    public Observable unregister() {
        hasUnregistered = true;
        return delegate.unregister();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy