### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.connection

# Class BridgeServer

java.lang.Object
com.sas.services.connection.Server
com.sas.services.connection.TCPIPServer
com.sas.services.connection.BridgeServer

All Implemented Interfaces:
  `Serializable`, `Cloneable`

Direct Known Subclasses:
  `ZeroConfigWorkspaceServer`

@SASScope("ALL") @BinaryCompatibilityOnly public class BridgeServer extends TCPIPServer
A description of an IOM bridge protocol server. The default authentication service for bridge servers is `AUTH_SERVICE_HOST`.

See Also:
  - `Server.AUTH_SERVICE_HOST`
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final byte`
  `CURRENT_MAJOR_PROTOCOL_VERSION`
  Most recent Bridge Protocol major version
  `static final byte`
  `CURRENT_MINOR_PROTOCOL_VERSION`
  Most recent Bridge Protocol major version
  `static final String`
  `ENCRYPTION_ALGORITHM_AES`
  A value for the encryption algorithms attribute indicating that AES encryption may be used.
  `static final String`
  `ENCRYPTION_ALGORITHM_DES`
  A value for the encryption algorithms attribute indicating that DES encryption may be used.
  `static final String`
  `ENCRYPTION_ALGORITHM_RC2`
  A value for the encryption algorithms attribute indicating that RC2 encryption may be used.
  `static final String`
  `ENCRYPTION_ALGORITHM_RC4`
  A value for the encryption algorithms attribute indicating that RC4 encryption may be used.
  `static final String`
  `ENCRYPTION_ALGORITHM_SASPROPRIETARY`
  A value for the encryption algorithms attribute indicating that sasproprietary encryption may be used.
  `static final String`
  `ENCRYPTION_ALGORITHM_TRIPLEDES`
  A value for the encryption algorithms attribute indicating that TRIPLEDES encryption may be used.
  `static final String`
  `ENCRYPTION_CONTENT_ALL`
  A value for the encryption content attribute indicating that all communication is encrypted.
  `static final String`
  `ENCRYPTION_CONTENT_AUTHENTICATION`
  A value for the encryption content attribute indicating that only user name and password information is encrypted.
  `static final String`
  `ENCRYPTION_POLICY_NONE`
  A value for the encryption policy attribute indicating that no communication with the server will be encrypted.
  `static final String`
  `ENCRYPTION_POLICY_OPTIONAL`
  A value for the encryption policy attribute indicating that communication with the server will be encrypted if the server supports an encryption algorithm supported by the client.
  `static final String`
  `ENCRYPTION_POLICY_REQUIRED`
  A value for the encryption policy attribute indicating that communication with the server will be encrypted if the server supports an encryption algorithm supported by the client.

  ### Fields inherited from class com.sas.services.connection.Server

  `AUTH_SERVICE_HOST, AUTH_SERVICE_METADATA, AUTH_SERVICE_NONE, AUTH_SERVICE_PROMPT, CLSID_ABM, CLSID_ABM_1_0, CLSID_OBJSPAWN, CLSID_OBJSPAWN_1_0, CLSID_OBJSPAWN_1_1, CLSID_POOLED_SAS, CLSID_POOLED_SAS_1_0, CLSID_SAS, CLSID_SAS_1_0, CLSID_SAS_1_1, CLSID_SAS_1_2, CLSID_SASGMS, CLSID_SASGMS_1_0, CLSID_SASMDX, CLSID_SASMDX_1_0, CLSID_SASMQX, CLSID_SASMQX_1_0, CLSID_SASOMI, CLSID_SASOMI_1_0, CLSID_SASOMI_1_1, CLSID_SASOMI_2_0, CLSID_SASSTP, CLSID_SASSTP_1_0, CLSID_SASTableServer, CLSID_SASTableServer_1_0, CLSID_UNDESIGNATED, OBJSPAWN_ID, SECURITY_PACKAGE_KERBEROS, SECURITY_PACKAGE_LIST_DEFAULT, SECURITY_PACKAGE_NEGOTIATE, SECURITY_PACKAGE_NTLM, SERVERTYPE_NOT_IOM, SERVERTYPE_OBJSPAWN, SERVERTYPE_SAS, SERVERTYPE_SASGMS, SERVERTYPE_SASMDX, SERVERTYPE_SASMQX, SERVERTYPE_SASOMI, SERVERTYPE_SASSTP, SERVERTYPE_SASTableServer, SERVERTYPE_UNDESIGNATED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BridgeServer(String classID, String host, int port)`
  Construct an object describing an IOM server.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected static int`
  `countOverlappingElements(String[] arr1, String[] arr2)`
  `protected static URL[]`
  `createUrlArray(String[] addrArr)`
  `boolean`
  `equals(Object that)`
  `String`
  `getEncryptionAlgorithms()`
  Get the encryption algorithms.
  `String`
  `getEncryptionContent()`
  Get the encryption content.
  `String`
  `getEncryptionPolicy()`
  Get the encryption policy.
  `Byte`
  `getMajor()`
  Get the major protocol version.
  `Byte`
  `getMinor()`
  Get the minor protocol version.
  `String`
  `getNormalizedEncryptionAlgorithms()`
  Get the normalized encryption algorithm list.
  `String`
  `getOption(String name)`
  Get the value of the named option.
  `String`
  `getSASVersionID()`
  Get the version ID for the server.
  `String`
  `getServerName()`
  Get the server name.
  `int`
  `hashCode()`
  `protected static String`
  `mergeProxyLists(String list1, String list2)`
  Merge two proxy lists.
  `static String`
  `normalizeEncryptionAlgorithms(String encryptionAlgorithms)`
  Normalizes a value for encryption algorithms.
  `String`
  `removeOption(String name)`
  Remove a name option and its value.
  `void`
  `setEncryptionAlgorithms(String encryptionAlgorithms)`
  Set the encryption algorithms.
  `void`
  `setEncryptionContent(String encryptionContent)`
  Set the encryption content.
  `void`
  `setEncryptionPolicy(String encryptionPolicy)`
  Set the encryption policy.
  `void`
  `setMajor(Byte major)`
  Set the major protocol version.
  `void`
  `setMinor(Byte minor)`
  Set the minor protocol version.
  `String`
  `setOption(String name, String value)`
  Set the value of the named option.
  `void`
  `setSASVersionID(String sasVersionID)`
  Set the version ID for the server.
  `void`
  `setServerName(String serverName)`
  Set the server name.
  `protected static boolean`
  `urlsEqual(URL url1, URL url2)`
  Compare two URLs.
  `static void`
  `validateEncryptionContent(String encryptionContent)`
  Checks the value for encryption content to make sure it is one of the valid values.
  `static void`
  `validateEncryptionPolicy(String encryptionPolicy)`
  Checks the value for encryption policy to make sure it is one of the valid values.

  ### Methods inherited from class com.sas.services.connection.TCPIPServer

  `getEntryPoint, getHost, getNormalizedHost, getPort, setHost, setPort`

  ### Methods inherited from class com.sas.services.connection.Server

  `clone, clsidNameToValue, clsidToServerType, enumArgumentCheck, enumArgumentException, fromURI, getAuthService, getClassID, getDelim, getDomain, getMaxClients, getNormalizedClassID, getNormalizedSecurityPackage, getNormalizedSecurityPackageList, getOptionMap, getReactivationLimit, getSecurityPackage, getSecurityPackageList, getServerComponentURI, getShutdownAfterMinutes, getSPN, isMetadataServerClassID, isPooledSasClsid, isSecurityPackageAllowed, normalizeSecurityPackage, normalizeSecurityPackageList, setAuthService, setClassID, setDomain, setMaxClients, setReactivationLimit, setSecurityPackage, setSecurityPackageList, setServerComponentURI, setShutdownAfterMinutes, setSPN, toString, toURI, validateAuthService`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ENCRYPTION_POLICY_REQUIRED

    public static final String ENCRYPTION_POLICY_REQUIRED
    A value for the encryption policy attribute indicating that communication with the server will be encrypted if the server supports an encryption algorithm supported by the client. Otherwise the connection will fail.
    See Also:
      - `setEncryptionPolicy(java.lang.String)`
      - `getEncryptionPolicy()`
      - Constant Field Values

  - ### ENCRYPTION_POLICY_OPTIONAL

    public static final String ENCRYPTION_POLICY_OPTIONAL
    A value for the encryption policy attribute indicating that communication with the server will be encrypted if the server supports an encryption algorithm supported by the client. This value is no longer recognized. If it is specified, it will be treated internally as `ENCRYPTION_POLICY_REQUIRED`.
    See Also:
      - `setEncryptionPolicy(java.lang.String)`
      - `getEncryptionPolicy()`
      - Constant Field Values

  - ### ENCRYPTION_POLICY_NONE

    public static final String ENCRYPTION_POLICY_NONE
    A value for the encryption policy attribute indicating that no communication with the server will be encrypted. This value is no longer recognized. If it is specified, it will be treated internally as `ENCRYPTION_POLICY_REQUIRED`.
    See Also:
      - `setEncryptionPolicy(java.lang.String)`
      - `getEncryptionPolicy()`
      - Constant Field Values

  - ### ENCRYPTION_CONTENT_ALL

    public static final String ENCRYPTION_CONTENT_ALL
    A value for the encryption content attribute indicating that all communication is encrypted.
    See Also:
      - `setEncryptionContent(java.lang.String)`
      - `getEncryptionContent()`
      - Constant Field Values

  - ### ENCRYPTION_CONTENT_AUTHENTICATION

    public static final String ENCRYPTION_CONTENT_AUTHENTICATION
    A value for the encryption content attribute indicating that only user name and password information is encrypted.
    See Also:
      - `setEncryptionContent(java.lang.String)`
      - `getEncryptionContent()`
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_SASPROPRIETARY

    public static final String ENCRYPTION_ALGORITHM_SASPROPRIETARY
    A value for the encryption algorithms attribute indicating that sasproprietary encryption may be used. Encryption using sasproprietary is generally weaker and slower than other supported algorithms, but it requires no special licensing.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_RC2

    public static final String ENCRYPTION_ALGORITHM_RC2
    A value for the encryption algorithms attribute indicating that RC2 encryption may be used. RC2 encryption can only be used if SAS/SECURE software is installed on both the client and server.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_RC4

    public static final String ENCRYPTION_ALGORITHM_RC4
    A value for the encryption algorithms attribute indicating that RC4 encryption may be used. RC4 encryption can only be used if SAS/SECURE software is installed on both the client and server.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_DES

    public static final String ENCRYPTION_ALGORITHM_DES
    A value for the encryption algorithms attribute indicating that DES encryption may be used. DES encryption can only be used if SAS/SECURE software is installed on both the client and server.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_TRIPLEDES

    public static final String ENCRYPTION_ALGORITHM_TRIPLEDES
    A value for the encryption algorithms attribute indicating that TRIPLEDES encryption may be used. TRIPLEDES encryption can only be used if SAS/SECURE software is installed on both the client and server.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_ALGORITHM_AES

    public static final String ENCRYPTION_ALGORITHM_AES
    A value for the encryption algorithms attribute indicating that AES encryption may be used. AES encryption can only be used if SAS/SECURE software is installed on both the client and server.
    See Also:
      - Constant Field Values

  - ### CURRENT_MAJOR_PROTOCOL_VERSION

    public static final byte CURRENT_MAJOR_PROTOCOL_VERSION
    Most recent Bridge Protocol major version
    See Also:
      - Constant Field Values

  - ### CURRENT_MINOR_PROTOCOL_VERSION

    public static final byte CURRENT_MINOR_PROTOCOL_VERSION
    Most recent Bridge Protocol major version
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### BridgeServer

    public BridgeServer(String classID, String host, int port)
    Construct an object describing an IOM server.
    Parameters:
      `classID` - the ID of the class to instantiate on the IOM server.
      `host` - the IP name or address of the machine hosting the IOM server.
      `port` - the TCP port number where the server is listening for connections.

- ## Method Details

  - ### setEncryptionPolicy

    public void setEncryptionPolicy(String encryptionPolicy)
    Set the encryption policy. Valid values are specified with the `ENCRYPTION_POLICY_*` fields. The default value is `ENCRYPTION_POLICY_REQUIRED`
    Parameters:
      `encryptionPolicy` - the encryption policy
    Throws:
      `IllegalArgumentException` - if the value is not one of the `ENCRYPTION_POLICY_*` fields
    See Also:
      - `ENCRYPTION_POLICY_REQUIRED`
      - `ENCRYPTION_POLICY_OPTIONAL`
      - `ENCRYPTION_POLICY_NONE`

  - ### getEncryptionPolicy

    public String getEncryptionPolicy()
    Get the encryption policy.
    Returns:
      the encryption policy
    See Also:
      - `ENCRYPTION_POLICY_REQUIRED`
      - `ENCRYPTION_POLICY_OPTIONAL`
      - `ENCRYPTION_POLICY_NONE`
      - `setEncryptionPolicy(java.lang.String)`

  - ### setEncryptionContent

    public void setEncryptionContent(String encryptionContent)
    Set the encryption content. Valid values are specified with the `ENCRYPTION_CONTENT_*` fields. The default value is `ENCRYPTION_CONTENT_AUTHENTICATION`.
    Parameters:
      `encryptionContent` - the encryption content
    Throws:
      `IllegalArgumentException` - if the value is not one of the `ENCRYPTION_CONTENT_*` fields
    See Also:
      - `ENCRYPTION_CONTENT_ALL`
      - `ENCRYPTION_CONTENT_AUTHENTICATION`

  - ### getEncryptionContent

    public String getEncryptionContent()
    Get the encryption content.
    Returns:
      the encryption content
    See Also:
      - `setEncryptionContent(java.lang.String)`
      - `ENCRYPTION_CONTENT_ALL`
      - `ENCRYPTION_CONTENT_AUTHENTICATION`

  - ### setEncryptionAlgorithms

    public void setEncryptionAlgorithms(String encryptionAlgorithms)
    Set the encryption algorithms. To use any algorithm other than `ENCRYPTION_ALGORITHM_SASPROPRIETARY`, SAS/SECURE software must be installed on both the client and server. Furthermore, government import and export restrictions may limit the countries in which SAS/SECURE is available.

    The value for this attribute may be a comma-separated list of more than one algorithm. The connection will use the first algorithm on this list that is also supported by the server. If no value is specified, the connection will use the first value suggested by the server that the client is capable of supporting.

    The value of this attribute is not checked for validity because it is possible to extend the list of supported algorithms in the field although no such extensions are currently available.

    Parameters:
      `encryptionAlgorithms` - the encryption algorithms
    See Also:
      - `ENCRYPTION_ALGORITHM_SASPROPRIETARY`
      - `ENCRYPTION_ALGORITHM_RC2`
      - `ENCRYPTION_ALGORITHM_RC4`
      - `ENCRYPTION_ALGORITHM_DES`
      - `ENCRYPTION_ALGORITHM_AES`
      - `ENCRYPTION_ALGORITHM_TRIPLEDES`

  - ### getEncryptionAlgorithms

    public String getEncryptionAlgorithms()
    Get the encryption algorithms. This method may return `null`.
    Returns:
      the encryption algorithms
    See Also:
      - `setEncryptionAlgorithms(java.lang.String)`
      - `ENCRYPTION_ALGORITHM_SASPROPRIETARY`
      - `ENCRYPTION_ALGORITHM_RC2`
      - `ENCRYPTION_ALGORITHM_RC4`
      - `ENCRYPTION_ALGORITHM_DES`
      - `ENCRYPTION_ALGORITHM_AES`
      - `ENCRYPTION_ALGORITHM_TRIPLEDES`

  - ### getNormalizedEncryptionAlgorithms

    public String getNormalizedEncryptionAlgorithms()
    Get the normalized encryption algorithm list. The normalized encryption algorithm list is all lowercase, and all whitespace around the algorithm names is removed. This method may return `null`.
    Returns:
      the normalized encryption algorithm list

  - ### getMajor

    public Byte getMajor()
    Get the major protocol version.
    Returns:
      the major protocol version

  - ### setMajor

    public void setMajor(Byte major)
    Set the major protocol version.
    Parameters:
      `major` - the major protocol version

  - ### getMinor

    public Byte getMinor()
    Get the minor protocol version.
    Returns:
      the minor protocol version

  - ### setMinor

    public void setMinor(Byte minor)
    Set the minor protocol version.
    Parameters:
      `minor` - the minor protocol version

  - ### getServerName

    public String getServerName()
    Get the server name.
    Returns:
      the server name

  - ### setServerName

    public void setServerName(String serverName)
    Set the server name.
    Parameters:
      `serverName` - the server name

  - ### getSASVersionID

    public String getSASVersionID()
    Get the version ID for the server.
    Returns:
      the version ID for the server.

  - ### setSASVersionID

    public void setSASVersionID(String sasVersionID)
    Set the version ID for the server.
    Parameters:
      `sasVersionID` - the version ID for the server.

  - ### setOption

    public String setOption(String name, String value)
    Description copied from class: `Server`
    Set the value of the named option.
    Overrides:
      `setOption` in class `TCPIPServer`
    Parameters:
      `name` - the option name
      `value` - the option value
    Returns:
      the previous option value

  - ### getOption

    public String getOption(String name)
    Description copied from class: `Server`
    Get the value of the named option.
    Overrides:
      `getOption` in class `TCPIPServer`
    Parameters:
      `name` - the option name
    Returns:
      the value of the named option

  - ### removeOption

    public String removeOption(String name)
    Description copied from class: `Server`
    Remove a name option and its value.
    Overrides:
      `removeOption` in class `TCPIPServer`
    Parameters:
      `name` - the option name
    Returns:
      the previous value

  - ### equals

    public boolean equals(Object that)
    Overrides:
      `equals` in class `TCPIPServer`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `TCPIPServer`

  - ### normalizeEncryptionAlgorithms

    public static String normalizeEncryptionAlgorithms(String encryptionAlgorithms)
    Normalizes a value for encryption algorithms. Specifically, it removes whitespace surrounding commas and lower cases all the algorithm names.
    Parameters:
      `encryptionAlgorithms` - the original value
    Returns:
      the normalized value

  - ### validateEncryptionPolicy

    public static void validateEncryptionPolicy(String encryptionPolicy)
    Checks the value for encryption policy to make sure it is one of the valid values.
    Parameters:
      `encryptionPolicy` - the original value
    Throws:
      `IllegalArgumentException` - if the value is not valid

  - ### validateEncryptionContent

    public static void validateEncryptionContent(String encryptionContent)
    Checks the value for encryption content to make sure it is one of the valid values.
    Parameters:
      `encryptionContent` - the original value
    Throws:
      `IllegalArgumentException` - if the value is not valid

  - ### mergeProxyLists

    protected static String mergeProxyLists(String list1, String list2)
    Merge two proxy lists. Proxy list values can be specified for a server in the metadata for the server or as the value of the SAS_IOM_PROXYLIST environment variable or both. If there is a value in both places, they are merged together. If the lists overlap, then the duplicate items are removed from the merged list. If the last X items in the first list are the same as the first X items in the second list, then those items are not repeated in the merged list.
    Parameters:
      `list1` - SAS_IOM_PROXYLIST value
      `list2` - metadata proxylist value
    Returns:
      merged proxy list

  - ### countOverlappingElements

    protected static int countOverlappingElements(String[] arr1, String[] arr2)

  - ### createUrlArray

    protected static URL[] createUrlArray(String[] addrArr)

  - ### urlsEqual

    protected static boolean urlsEqual(URL url1, URL url2)
    Compare two URLs. If either or both URLs are null return false. That means the proxy address is malformed, and we can only do a simple string compare which we've already done, so just return false.
    Parameters:
      `url1` - the URL
      `url2` - the other URL
    Returns:
      true if the URLs are equal