com.ibm.cics.core.connections
Class ConnectionParameters

java.lang.Object
  extended by com.ibm.cics.core.connections.ConnectionParameters

public class ConnectionParameters
extends java.lang.Object

Immutable class representing a set of parameters to be used when establishing a connection


Nested Class Summary
static class ConnectionParameters.AttributeValue
          Utility class representing a pair of an attribute and its value.
 
Constructor Summary
ConnectionParameters(java.lang.String id, java.lang.String name, java.lang.String connectionTypeId, ConnectionParameters.AttributeValue... avs)
          Constructor
ConnectionParameters(java.lang.String id, java.lang.String name, java.lang.String connectionTypeId, java.util.Map<java.lang.String,java.lang.String> avs)
          Constructor
 
Method Summary
static ConnectionParameters.AttributeValue av(java.lang.String attribute, java.lang.String value)
          Utility method to create an attribute value
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttribute(java.lang.String attribute)
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
           
 java.lang.String getConnectionTypeId()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 int hashCode()
           
 ConnectionParameters setAttribute(java.lang.String attribute, java.lang.String value)
          Updates or adds one attribute leaving others unchanged
 ConnectionParameters setAttributes(ConnectionParameters.AttributeValue... avs)
          Overwrites the set of attributes with a brand new set, and returns a new instance
 ConnectionParameters setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
          Overwrites the set of attributes with a brand new set, returning a new instance
 ConnectionParameters setId(java.lang.String id)
          Returns a new ConnectionParameters instance with a new ID
 ConnectionParameters setName(java.lang.String name)
          Sets the name of these connection parameters, returning a new instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionParameters

public ConnectionParameters(java.lang.String id,
                            java.lang.String name,
                            java.lang.String connectionTypeId,
                            ConnectionParameters.AttributeValue... avs)
Constructor

Parameters:
id - system-wide unique ID
name - name
connectionTypeId - connection type ID the parameters are for
avs - pairs of extended attributes and values

ConnectionParameters

public ConnectionParameters(java.lang.String id,
                            java.lang.String name,
                            java.lang.String connectionTypeId,
                            java.util.Map<java.lang.String,java.lang.String> avs)
Constructor

Parameters:
id - system-wide unique ID
name - name
connectionTypeId - connection type ID the parameters are for
avs - map of extended attributes and values
Method Detail

toString

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

getName

public java.lang.String getName()
Returns:
the name of the connection parameters

getId

public java.lang.String getId()
Returns:
the unique ID of these connection parameters

setId

public ConnectionParameters setId(java.lang.String id)
Returns a new ConnectionParameters instance with a new ID

Parameters:
id - the new ID
Returns:
a new ConnectionParameters instance base on this instance with a new ID

getConnectionTypeId

public java.lang.String getConnectionTypeId()
Returns:
connection type ID

getAttribute

public java.lang.String getAttribute(java.lang.String attribute)

setAttribute

public ConnectionParameters setAttribute(java.lang.String attribute,
                                         java.lang.String value)
Updates or adds one attribute leaving others unchanged

Parameters:
attribute -
value -
Returns:

setAttributes

public ConnectionParameters setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Overwrites the set of attributes with a brand new set, returning a new instance

Parameters:
attributes -
Returns:

setAttributes

public ConnectionParameters setAttributes(ConnectionParameters.AttributeValue... avs)
Overwrites the set of attributes with a brand new set, and returns a new instance

Parameters:
attributes -
Returns:

av

public static ConnectionParameters.AttributeValue av(java.lang.String attribute,
                                                     java.lang.String value)
Utility method to create an attribute value

Parameters:
attribute -
value -
Returns:

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()

hashCode

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

equals

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

setName

public ConnectionParameters setName(java.lang.String name)
Sets the name of these connection parameters, returning a new instance.

Parameters:
name -
Returns:


Copyright © 2013 IBM Corp. All Rights Reserved.