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

Class BridgeServer

java.lang.Object
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:
  • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • CURRENT_MAJOR_PROTOCOL_VERSION

      public static final byte CURRENT_MAJOR_PROTOCOL_VERSION
      Most recent Bridge Protocol major version
      See Also:
    • CURRENT_MINOR_PROTOCOL_VERSION

      public static final byte CURRENT_MINOR_PROTOCOL_VERSION
      Most recent Bridge Protocol major version
      See Also:
  • 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:
    • getEncryptionPolicy

      public String getEncryptionPolicy()
      Get the encryption policy.
      Returns:
      the encryption policy
      See Also:
    • 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:
    • getEncryptionContent

      public String getEncryptionContent()
      Get the encryption content.
      Returns:
      the encryption content
      See Also:
    • 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:
    • getEncryptionAlgorithms

      public String getEncryptionAlgorithms()
      Get the encryption algorithms. This method may return null.
      Returns:
      the encryption algorithms
      See Also:
    • 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