Class ECIChannelRecord

java.lang.Object
com.ibm.jakarta.connector2.cics.ECIChannelRecord
All Implemented Interfaces:
jakarta.resource.cci.MappedRecord, jakarta.resource.cci.Record, Serializable, Cloneable, Map

public class ECIChannelRecord extends Object implements jakarta.resource.cci.MappedRecord
ECIChannelRecord provides channels and containers support for the CICS ECI resource adapter. This channel record takes the form of a JCA MappedRecord to which container objects can be added.
  • Field Details

  • Constructor Details

    • ECIChannelRecord

      public ECIChannelRecord(String name) throws jakarta.resource.ResourceException
      Creates a new empty channel record with the specified name.

      The channel name must be between 1 and 16 characters in length and must consist of only the following types of character:

      • Uppercase characters (A-Z)
      • Lowercase characters (a-z)
      • Digits (0-9)
      • Special characters < > $ @ # / %   ? ! : | " = ' ; . - and _

      Channel names are case sensitive.

      Parameters:
      name - The name of the channel.
      Throws:
      jakarta.resource.ResourceException - if name is null or contains invalid characters, or the length of name is invalid.
  • Method Details

    • getRecordName

      public String getRecordName()
      Returns the name of the channel record.
      Specified by:
      getRecordName in interface jakarta.resource.cci.Record
    • getRecordShortDescription

      public String getRecordShortDescription()
      Returns the short description of the channel record.
      Specified by:
      getRecordShortDescription in interface jakarta.resource.cci.Record
    • setRecordName

      public void setRecordName(String name)
      This method does not change the record name. Channel names are immutable. This method exists solely to conform to the MappedRecord interface.
      Specified by:
      setRecordName in interface jakarta.resource.cci.Record
    • setRecordShortDescription

      public void setRecordShortDescription(String description)
      Sets the short description of the channel record.
      Specified by:
      setRecordShortDescription in interface jakarta.resource.cci.Record
    • clear

      public void clear()
      Removes all containers from the channel.
      Specified by:
      clear in interface Map
    • containsKey

      public boolean containsKey(Object name)
      Returns whether or not the specified container exists in the channel.
      Specified by:
      containsKey in interface Map
      Parameters:
      name - A container name.
    • containsValue

      public boolean containsValue(Object data)
      Returns whether or not there is a container with the specified data within the channel.
      Specified by:
      containsValue in interface Map
      Parameters:
      data - A String or byte[].
      Returns:
      true if there is a container with the specified data, false otherwise.
    • entrySet

      public Set entrySet()
      Returns a set of containers in name-value form.
      Specified by:
      entrySet in interface Map
    • get

      public Object get(Object name)
      Retrieves the data for the specified container from the channel.
      Specified by:
      get in interface Map
      Parameters:
      name - The name of the container to retrieve.
      Returns:
      The container data, or null if the container did not exist in the channel.
    • isEmpty

      public boolean isEmpty()
      Returns whether the channel is empty or not.
      Specified by:
      isEmpty in interface Map
    • keySet

      public Set keySet()
      Returns a set of the container names in the channel.
      Specified by:
      keySet in interface Map
    • put

      public Object put(Object name, Object data)
      Adds a container to the channel. If a container of the same name already exists in the channel, the existing container is replaced with the new container.

      The container name must be between 1 and 16 characters in length and must consist of only the following types of character:

      • Uppercase characters (A-Z)
      • Lowercase characters (a-z)
      • Digits (0-9)
      • Special characters < > $ @ # / %   ? ! : | " = ' ; . - and _

      Container names are case sensitive.

      To create a CHAR container, the data parameter must be of type String. To create a BIT container, the data parameter must be of type byte[] or be a type that implements the Streamable interface.

      Specified by:
      put in interface Map
      Parameters:
      name - The name of the container.
      data - The container data.
      Returns:
      null if the container is added, the original container data if the container is replaced
    • putAll

      public void putAll(Map containers)
      Puts a group of containers into the channel. Any containers of the same name that already exist in the channel are replaced with the new versions of the containers.

      Container names must be between 1 and 16 characters in length and must consist of only the following types of character:

      • Uppercase characters (A-Z)
      • Lowercase characters (a-z)
      • Digits (0-9)
      • Special characters < > $ @ # / %   ? ! : | " = ' ; . - and _

      Container names are case sensitive.

      To create a CHAR container, the data parameter must be of type String. To create a BIT container, the data parameter must be of type byte[] or be a type that implements the Streamable interface.

      Specified by:
      putAll in interface Map
      Parameters:
      containers - A map of container names to container data.
    • remove

      public Object remove(Object name)
      Removes a container from the channel.
      Specified by:
      remove in interface Map
      Parameters:
      name - The name of the container to remove.
      Returns:
      The container data removed from the channel, or null if the container did not exist in the channel.
    • markDeleted

      public void markDeleted(Object name)
      Removes a container from the channel.
      Parameters:
      name - The name of the container to remove.
    • size

      public int size()
      Returns the number of containers in the channel.
      Specified by:
      size in interface Map
    • values

      public Collection<?> values()
      Returns the contents of all the containers in the channel.
      Specified by:
      values in interface Map
    • clone

      public Object clone() throws CloneNotSupportedException
      Not supported.
      Specified by:
      clone in interface jakarta.resource.cci.Record
      Throws:
      CloneNotSupportedException
    • getChannel

      public com.ibm.ctg.client.Channel getChannel()
    • setChannel

      public void setChannel(com.ibm.ctg.client.Channel myChannel)
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Map
      Specified by:
      equals in interface jakarta.resource.cci.Record
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map
      Specified by:
      hashCode in interface jakarta.resource.cci.Record
      Overrides:
      hashCode in class Object