Brooklyn

brooklyn.location
[Java] Interface PortRange


public interface PortRange
extends java.lang.Iterable

A range of ports (indicator for Location and other APIs). Using methods PortRanges.fromXxx this is adaptable from a number, a string, or a collection of numbers or a strings. String may be of the form:

  • "80": just 80
  • "8080-8090": limited range sequentially; ie try 8080, then 8081, ..., then 8090, then give up
  • "8080-8000": as above, but descending; ie try 8080, then 8079, ..., then 8000, then give up
  • "8000+": unlimited range sequentially; ie try 8000, then 8001, then 8002, etc
  • "80,8080,8000,8080-8099": different ranges, in order; ie try 80, then 8080, then 8000, then 8080 (again), then 8081, ..., then 8099, then give up Ranges (but not lists) may be preceeded by "!" to indicate a randomly selected port:


    Method Summary
    boolean asBoolean()

    boolean isEmpty()

     
    Methods inherited from interface java.lang.Iterable
    java.lang.Iterable#iterator()
     
    Methods inherited from class java.lang.Object
    java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
     

    Method Detail

    asBoolean

    public boolean asBoolean()


    isEmpty

    public boolean isEmpty()


     

    Brooklyn Multi-Cloud Application Management Platform
    brooklyncentral.github.com. Apache License. © 2012.