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

org.scassandra.http.client.CurrentConnectionReport Maven / Gradle / Ivy

package org.scassandra.http.client;

import java.net.InetSocketAddress;
import java.util.List;

import com.google.common.base.Function;
import com.google.common.collect.Lists;

public class CurrentConnectionReport implements ConnectionReport {
    private final List connections;

    public CurrentConnectionReport(List connections) {
        this.connections = connections;
    }

    @Override
    public List getConnections() {
        return connections;
    }

    @Override
    public List getAddresses() {
        return Lists.transform(this.connections, new Function() {
            @Override
            public InetSocketAddress apply(ClientConnection input) {
                return input.getAddress();
            }
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy