*** 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
A description of an IOM bridge protocol server. The default authentication
service for bridge servers is
AUTH_SERVICE_HOST.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteMost recent Bridge Protocol major versionstatic final byteMost recent Bridge Protocol major versionstatic final StringA value for the encryption algorithms attribute indicating that AES encryption may be used.static final StringA value for the encryption algorithms attribute indicating that DES encryption may be used.static final StringA value for the encryption algorithms attribute indicating that RC2 encryption may be used.static final StringA value for the encryption algorithms attribute indicating that RC4 encryption may be used.static final StringA value for the encryption algorithms attribute indicating that sasproprietary encryption may be used.static final StringA value for the encryption algorithms attribute indicating that TRIPLEDES encryption may be used.static final StringA value for the encryption content attribute indicating that all communication is encrypted.static final StringA value for the encryption content attribute indicating that only user name and password information is encrypted.static final StringA value for the encryption policy attribute indicating that no communication with the server will be encrypted.static final StringA 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 StringA 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
ConstructorsConstructorDescriptionBridgeServer(String classID, String host, int port) Construct an object describing an IOM server. -
Method Summary
Modifier and TypeMethodDescriptionprotected static intcountOverlappingElements(String[] arr1, String[] arr2) protected static URL[]createUrlArray(String[] addrArr) booleanequals(Object that) StringGet the encryption algorithms.StringGet the encryption content.StringGet the encryption policy.BytegetMajor()Get the major protocol version.BytegetMinor()Get the minor protocol version.StringGet the normalized encryption algorithm list.StringgetOption(String name) Get the value of the named option.StringGet the version ID for the server.StringGet the server name.inthashCode()protected static StringmergeProxyLists(String list1, String list2) Merge two proxy lists.static StringnormalizeEncryptionAlgorithms(String encryptionAlgorithms) Normalizes a value for encryption algorithms.StringremoveOption(String name) Remove a name option and its value.voidsetEncryptionAlgorithms(String encryptionAlgorithms) Set the encryption algorithms.voidsetEncryptionContent(String encryptionContent) Set the encryption content.voidsetEncryptionPolicy(String encryptionPolicy) Set the encryption policy.voidsetMajor(Byte major) Set the major protocol version.voidsetMinor(Byte minor) Set the minor protocol version.StringsetOption(String name, String value) Set the value of the named option.voidsetSASVersionID(String sasVersionID) Set the version ID for the server.voidsetServerName(String serverName) Set the server name.protected static booleanurlsEqual(URL url1, URL url2) Compare two URLs.static voidvalidateEncryptionContent(String encryptionContent) Checks the value for encryption content to make sure it is one of the valid values.static voidvalidateEncryptionPolicy(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, setPortMethods 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, validateAuthServiceMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
ENCRYPTION_POLICY_REQUIRED
public static final String ENCRYPTION_POLICY_REQUIREDA 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_OPTIONALA 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 asENCRYPTION_POLICY_REQUIRED.- See Also:
-
ENCRYPTION_POLICY_NONE
public static final String ENCRYPTION_POLICY_NONEA 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 asENCRYPTION_POLICY_REQUIRED.- See Also:
-
ENCRYPTION_CONTENT_ALL
public static final String ENCRYPTION_CONTENT_ALLA value for the encryption content attribute indicating that all communication is encrypted.- See Also:
-
ENCRYPTION_CONTENT_AUTHENTICATION
public static final String ENCRYPTION_CONTENT_AUTHENTICATIONA 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_SASPROPRIETARYA 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_RC2A 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_RC4A 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_DESA 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_TRIPLEDESA 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_AESA 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_VERSIONMost recent Bridge Protocol major version- See Also:
-
CURRENT_MINOR_PROTOCOL_VERSION
public static final byte CURRENT_MINOR_PROTOCOL_VERSIONMost 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 theENCRYPTION_POLICY_*fields. The default value isENCRYPTION_POLICY_REQUIRED- Parameters:
encryptionPolicy- the encryption policy- Throws:
IllegalArgumentException- if the value is not one of theENCRYPTION_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 theENCRYPTION_CONTENT_*fields. The default value isENCRYPTION_CONTENT_AUTHENTICATION.- Parameters:
encryptionContent- the encryption content- Throws:
IllegalArgumentException- if the value is not one of theENCRYPTION_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 thanENCRYPTION_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 returnnull.- 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 returnnull.- 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:ServerSet the value of the named option.- Overrides:
setOptionin classTCPIPServer- Parameters:
name- the option namevalue- the option value- Returns:
- the previous option value
-
getOption
public String getOption(String name) Description copied from class:ServerGet the value of the named option.- Overrides:
getOptionin classTCPIPServer- Parameters:
name- the option name- Returns:
- the value of the named option
-
removeOption
public String removeOption(String name) Description copied from class:ServerRemove a name option and its value.- Overrides:
removeOptionin classTCPIPServer- Parameters:
name- the option name- Returns:
- the previous value
-
equals
public boolean equals(Object that) - Overrides:
equalsin classTCPIPServer
-
hashCode
public int hashCode()- Overrides:
hashCodein classTCPIPServer
-
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 valuelist2- 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 URLurl2- the other URL- Returns:
- true if the URLs are equal
-