com.ibm.cics.core.comm
Class ConnectionConfiguration

java.lang.Object
  extended by com.ibm.cics.core.comm.ConnectionConfiguration

public class ConnectionConfiguration
extends java.lang.Object

Configuration data to be assigned to an IConnection. The information in this configuration should be considered connection-specific, and should define all of the parameters required to establish a connection successfully. Some attributes such as host and port are defined explicitly, and can be set using the supplied setter methods: #setHost(), #setPort(). Further non-generic attributes can be specified by using the setExtendedAttribute(String, String) in conjunction with a predefined key, which an implementation of IConnection can use to retrieve the value by invoking getExtendedAttribute(String).


Constructor Summary
ConnectionConfiguration(ConnectionConfiguration other)
          Create a duplicate of an existing connection configuration with a new ID.
ConnectionConfiguration(java.lang.String newID, ConnectionConfiguration other)
          Create a duplicate of an existing connection configuration with a new ID.
ConnectionConfiguration(java.lang.String name, java.lang.String host, int port, java.lang.String credentialsID)
          Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean)
ConnectionConfiguration(java.lang.String name, java.lang.String host, int port, java.lang.String userID, java.lang.String password)
          Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean)
ConnectionConfiguration(java.lang.String name, java.lang.String host, int port, java.lang.String userID, java.lang.String password, boolean secureHint)
          Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean, boolean)
ConnectionConfiguration(java.lang.String id, java.lang.String name, java.lang.String host, int port, java.lang.String credentialsID)
          Construct a new ConnectionConfiguration using the supplied parameters.
ConnectionConfiguration(java.lang.String id, java.lang.String name, java.lang.String host, int port, java.lang.String credentialsID, boolean secureHint)
          Construct a new ConnectionConfiguration using the supplied parameters.
ConnectionConfiguration(java.lang.String id, java.lang.String name, java.lang.String host, int port, java.lang.String credentialsID, boolean secureHint, boolean confirmedSecurity)
          Construct a new ConnectionConfiguration using the supplied parameters.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCredentialsID()
          Getter for credentials ID
 java.lang.String getExtendedAttribute(java.lang.String key)
          Get the value of a specific extended attribute
 java.util.Set<java.lang.String> getExtendedKeys()
          Get a Set of keys representing extended attributes that are available for this connection configuration.
 java.lang.String getHost()
          Getter for host
 java.lang.String getID()
          Getter for ID
 java.lang.String getName()
          Getter for name
 java.lang.String getPassword()
          Getter for password
 int getPort()
          Getter for port
 boolean getSecureHint()
          Getter for the secure hint
 java.lang.String getUserID()
          Getter for user ID
 int hashCode()
           
 boolean isSSLConfirmed()
          Getter for SSL Confirmation
 void setCredentialsID(java.lang.String credentialsID)
          Setter for credentials ID
 void setExtendedAttribute(java.lang.String key, java.lang.String value)
          Set the value of a specific extended attribute.
 void setHost(java.lang.String host)
          Setter for host
 void setName(java.lang.String name)
          Setter for name
 void setPassword(java.lang.String password)
          Setter for password
 void setPort(int port)
          Setter for port
 void setSecureHint(boolean hint)
          Setter for the secure hint
 void setSslConfirmation(boolean sslConfirmation)
          Setter for SSL Confirmation
 void setUserID(java.lang.String userID)
          Setter for user ID
 boolean staticallyEquals(ConnectionConfiguration other)
          Deprecated. connections are not anticipated to change any fields of a connection configuration, so it should be possible to use the regular equals(Object) method to determine connection configuration equality.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionConfiguration

@Deprecated
public ConnectionConfiguration(java.lang.String name,
                                          java.lang.String host,
                                          int port,
                                          java.lang.String userID,
                                          java.lang.String password)
Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean)

Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the secure hint to false and defaults the ID to the value of the name.

Parameters:
name - the name of the configuration
host - the host name to connect to
port - the port to use
userID - the user ID to authenticate
password - a password to authenticate with

ConnectionConfiguration

public ConnectionConfiguration(java.lang.String name,
                               java.lang.String host,
                               int port,
                               java.lang.String userID,
                               java.lang.String password,
                               boolean secureHint)
Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean, boolean)

Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the ID to the value of the name

Parameters:
name - the name of the configuration
host - the host name to connect to
port - the port to use
userID - the user ID to authenticate as
password - a password to authenticate with
secureHint - whether or not a secure connection should be established

ConnectionConfiguration

@Deprecated
public ConnectionConfiguration(java.lang.String name,
                                          java.lang.String host,
                                          int port,
                                          java.lang.String credentialsID)
Deprecated. This constructor does not supply a unique ID for the configuration. Use ConnectionConfiguration(String, String, String, int, String, boolean)

Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the ID to the value of the name

Parameters:
name - the name of the configuration
host - the host name to connect to
port - the port to use
credentialsID - the ID of the associated credentials

ConnectionConfiguration

public ConnectionConfiguration(java.lang.String id,
                               java.lang.String name,
                               java.lang.String host,
                               int port,
                               java.lang.String credentialsID)
Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the secure hint to false, and the user ID and password to the empty string.

Parameters:
id - the unique ID of this configuration
name - the name of the configuration
host - the host name to connect to
port - the port to use
credentialsID - the ID of the associated credentials

ConnectionConfiguration

public ConnectionConfiguration(java.lang.String id,
                               java.lang.String name,
                               java.lang.String host,
                               int port,
                               java.lang.String credentialsID,
                               boolean secureHint)
Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the user ID and password to the empty string.

Parameters:
id - the unique ID of this configuration
name - the name of the configuration
host - the host name to connect to
port - the port to use
credentialsID - the ID of the associated credentials
secureHint - whether or not a secure connection should be established

ConnectionConfiguration

public ConnectionConfiguration(java.lang.String newID,
                               ConnectionConfiguration other)
Create a duplicate of an existing connection configuration with a new ID. All fields will be set to their values in the template connection configuration.

Parameters:
newID - the new ID to use
other - the connection configuration to copy.

ConnectionConfiguration

public ConnectionConfiguration(ConnectionConfiguration other)
Create a duplicate of an existing connection configuration with a new ID. All fields will be set to their values in the template connection configuration. Use ConnectionConfiguration(String, ConnectionConfiguration) to copy an existing connection configuration whilst specifying a new ID.


ConnectionConfiguration

public ConnectionConfiguration(java.lang.String id,
                               java.lang.String name,
                               java.lang.String host,
                               int port,
                               java.lang.String credentialsID,
                               boolean secureHint,
                               boolean confirmedSecurity)
Construct a new ConnectionConfiguration using the supplied parameters. This constructor defaults the user ID and password to the empty string.

Parameters:
id - the unique ID of this configuration
name - the name of the configuration
host - the host name to connect to
port - the port to use
credentialsID - the ID of the associated credentials
secureHint - whether or not a secure connection should be established
confirmedSecurity - whether the setting of the secure hint has been verified as accurate
Method Detail

getName

public java.lang.String getName()
Getter for name

Returns:
the name of this connection configuration

setName

public void setName(java.lang.String name)
Setter for name

Parameters:
name - the new name to use

getHost

public java.lang.String getHost()
Getter for host

Returns:
host to connect to

setHost

public void setHost(java.lang.String host)
Setter for host

Parameters:
host - host to connect to

getPort

public int getPort()
Getter for port

Returns:
port to connect using

setPort

public void setPort(int port)
Setter for port

Parameters:
port - port to connect using

getCredentialsID

public java.lang.String getCredentialsID()
Getter for credentials ID

Returns:
ID of the credentials in use by this connection configuration.

setCredentialsID

public void setCredentialsID(java.lang.String credentialsID)
Setter for credentials ID

Parameters:
credentialsID - ID of the credentials in use by this connection configuration.

getUserID

public java.lang.String getUserID()
Getter for user ID

Returns:
the user ID to authenticate as

setUserID

public void setUserID(java.lang.String userID)
Setter for user ID

Parameters:
userID - the user ID to authenticate as

getPassword

public java.lang.String getPassword()
Getter for password

Returns:
the password to authenticate using

setPassword

public void setPassword(java.lang.String password)
Setter for password

Parameters:
password - the password to authenticate using

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getExtendedKeys

public java.util.Set<java.lang.String> getExtendedKeys()
Get a Set of keys representing extended attributes that are available for this connection configuration.

Returns:
a set of available extended attribute keys. If no extended attributes are available, an empty set is returned.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

staticallyEquals

@Deprecated
public boolean staticallyEquals(ConnectionConfiguration other)
Deprecated. connections are not anticipated to change any fields of a connection configuration, so it should be possible to use the regular equals(Object) method to determine connection configuration equality.

Equality only using fields not updated by a connect()


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSecureHint

public boolean getSecureHint()
Getter for the secure hint

Returns:
whether or not a secure connection should be attempted

setSecureHint

public void setSecureHint(boolean hint)
Setter for the secure hint

Parameters:
hint - whether or not a secure connection should be attempted

getExtendedAttribute

public java.lang.String getExtendedAttribute(java.lang.String key)
Get the value of a specific extended attribute

Parameters:
key - the key of an extended attribute
Returns:
the value of the attribute or null if the supplied key does not exist on this connection configuration.

setExtendedAttribute

public void setExtendedAttribute(java.lang.String key,
                                 java.lang.String value)
Set the value of a specific extended attribute.

Parameters:
key - key to set a value for
value - value to set

getID

public java.lang.String getID()
Getter for ID

Returns:
the unique ID of this connection configuration

isSSLConfirmed

public boolean isSSLConfirmed()
Getter for SSL Confirmation

Returns:
whether or not the security setting for this connection configuration has been verified as accurate.

setSslConfirmation

public void setSslConfirmation(boolean sslConfirmation)
Setter for SSL Confirmation

Parameters:
sslConfirmation - whether or not the security setting for this connection configuration has been verified as accurate.


Copyright © 2013 IBM Corp. All Rights Reserved.