Class ContainerIterator

java.lang.Object
com.ibm.cics.server.API
com.ibm.cics.server.ContainerIterator
All Implemented Interfaces:
Iterator<Container>

@Deprecated public class ContainerIterator extends API implements Iterator<Container>
Deprecated.
This class is deprecated in CICS TS version 6.1, and may be removed in future versions of CICS. The functionality it provides is duplicated by using the Channel.getContainerNames() method to get the names of containers, and then using Channel.getContainer(java.lang.String,boolean) (with existence checking false), to get the container object. This new mechanism performs faster than using a ContainerIterator.

The ContainerIterator allows CICS Java programs to browse all Containers in a Channel. The iterator should ideally be created, used, and discarded before manipulating the underlying containers. If underlying containers are created or deleted after the ContainerIterator is constructed, then attempts are made to keep track of which containers exist in underlying CICS, and the iterator can return those that the java code is aware of. In such cases, it is possible that containers returned by this iterator no longer exist in the underlying CICS system.

See Also:
Since CICS TS version:
3.1
  • Method Details

    • getOwner

      @Deprecated public Object getOwner()
      Deprecated.
      As of release 6.1, replaced by the more strongly-typed equivalent getChannel()
      Get the owner of this iterator.
      Returns:
      The owning Channel.
      Since CICS TS version:
      3.1
    • getChannel

      public Channel getChannel()
      Deprecated.
      Get the Channel associated with this iterator. i.e: The channel which is iterated over to visit all the containers associated with that channel.
      Returns:
      The Channel, over which this iterator is acting.
      Since CICS TS version:
      6.1
    • hasNext

      public boolean hasNext()
      Deprecated.
      Determine if there is another Container in the Channel. If there is, and the Container does not already exist in Java, create a Container object to represent it.
      Specified by:
      hasNext in interface Iterator<Container>
      Returns:
      true if there is another Container, otherwise false.
      Since CICS TS version:
      3.1
    • next

      public Container next()
      Deprecated.
      Get the next Container from the Channel.
      Specified by:
      next in interface Iterator<Container>
      Returns:
      The next Container
      Throws:
      NoSuchElementException - there are no more containers left
      Since CICS TS version:
      4.1
    • remove

      public void remove()
      Deprecated.
      Remove an element from the Channel. This Iterator method is not supported. A Container can only be removed from the Channel when it is deleted.
      Specified by:
      remove in interface Iterator<Container>
      Throws:
      UnsupportedOperationException - if the method is called
      Since CICS TS version:
      3.1