Class BlacklistServiceFilter

  • All Implemented Interfaces:
    org.apache.camel.cloud.ServiceFilter

    public class BlacklistServiceFilter
    extends Object
    implements org.apache.camel.cloud.ServiceFilter
    • Constructor Detail

      • BlacklistServiceFilter

        public BlacklistServiceFilter()
      • BlacklistServiceFilter

        public BlacklistServiceFilter​(List<org.apache.camel.cloud.ServiceDefinition> blacklist)
    • Method Detail

      • setServers

        public void setServers​(List<String> servers)
        Set the servers to blacklist.
        Parameters:
        servers - server in the format: [service@]host:port.
      • setServers

        public void setServers​(String servers)
        Set the servers to blacklist.
        Parameters:
        servers - servers separated by comma in the format: [service@]host:port,[service@]host2:port,[service@]host3:port and so on.
      • addServer

        public void addServer​(org.apache.camel.cloud.ServiceDefinition server)
        Add a server to the known list of servers.
      • addServer

        public void addServer​(String serverString)
        Add a server to the known list of servers to blacklist.
        Parameters:
        serverString - servers separated by comma in the format: [service@]host:port,[service@]host2:port,[service@]host3:port and so on.
      • removeServer

        public void removeServer​(Predicate<org.apache.camel.cloud.ServiceDefinition> condition)
        Remove an existing server from the list of known servers.
      • apply

        public List<org.apache.camel.cloud.ServiceDefinition> apply​(List<org.apache.camel.cloud.ServiceDefinition> services)
        Specified by:
        apply in interface org.apache.camel.cloud.ServiceFilter
      • forServices

        public static BlacklistServiceFilter forServices​(org.apache.camel.cloud.ServiceDefinition... definitions)