All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.services.connection
Class HostPortSet

    com.sas.services.connection.HostPortSet

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<HostPortPair>, java.util.Collection<HostPortPair>, java.util.Set<HostPortPair>

    public class HostPortSet

Wraps multiple `HostPortPair` instances into one object. Used when multiple hostname and port values need to be included in a single property string.

Since:
  9.4
See Also:
  Serialized Form

Constructor Summary
`HostPortSet()`

Method Summary
`java.lang.String` | `getHosts()` Returns a space-delimited list of host names contained in this set.
`java.lang.String` | `getPorts()` Returns a space-delimited list of port numbers contained in this set.
`boolean` | `intersects(HostPortSet set)` Returns true if any HostPortPair in the specified set is contained in this set.
`static HostPortSet` | `newInstance(java.lang.String hostProperty, java.lang.String portProperty)` Create a new HostPortSet object from a list of host and ports.
`java.lang.String` | `toString()`

Constructor Detail

### HostPortSet

    public HostPortSet()

Method Detail

### newInstance

    public static HostPortSet newInstance(java.lang.String hostProperty,
                                          java.lang.String portProperty)

  Create a new HostPortSet object from a list of host and ports.

  Parameters:
    `hostProperty` - space-delimited list of host names. May be abbreviated to a single instance of the host name if all names in the list are identical.
    `portProperty` - space-delimited list of port numbers. May be abbreviated to a single port number if all ports in the list are identical.
  Returns:
    new HostPortSet object

### getHosts

    public java.lang.String getHosts()

  Returns a space-delimited list of host names contained in this set. The list will be abbreviated if all host names in this set are identical. Returns null if the set is empty.

  Returns:
    a space-delimited list of host names

### getPorts

    public java.lang.String getPorts()

  Returns a space-delimited list of port numbers contained in this set. The list will be abbreviated if all port numbers in this set are identical. Returns null if the set is empty.

  Returns:
    a space-delimited list of port numbers

### intersects

    public boolean intersects(HostPortSet set)

  Returns true if any HostPortPair in the specified set is contained in this set.

  Parameters:
    `set` - set to be compared
  Returns:
    true if any HostPortPair in the specified set is contained in this set

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.util.AbstractCollection<HostPortPair>`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.