com.ibm.cics.server

Class ContainerIterator

  • All Implemented Interfaces:
    java.util.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.

    @Deprecated
    public class ContainerIterator
    extends API
    implements java.util.Iterator<Container>

    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:
    com.ibm.cics.server.API for general restrictions on using the JCICS API.
    Since CICS TS version:
    3.1
    Since package version:
    1.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      Channel getChannel()
      Deprecated. 
      Get the Channel associated with this iterator.
      java.lang.Object getOwner()
      Deprecated. 
      As of release 6.1, replaced by the more strongly-typed equivalent getChannel()
      boolean hasNext()
      Deprecated. 
      Determine if there is another Container in the Channel.
      Container next()
      Deprecated. 
      Get the next Container from the Channel.
      void remove()
      Deprecated. 
      Remove an element from the Channel.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Method Detail

      • getOwner

        @Deprecated
        public java.lang.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
        Since package version:
        1.0.0
      • 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
        Since package version:
        2.0.0
      • 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 java.util.Iterator<Container>
        Returns:
        true if there is another Container, otherwise false.
        Since CICS TS version:
        3.1
        Since package version:
        1.0.0
      • next

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

        public void remove()
                    throws java.lang.UnsupportedOperationException
        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 java.util.Iterator<Container>
        Throws:
        java.lang.UnsupportedOperationException - if the method is called
        Since CICS TS version:
        3.1
        Since package version:
        1.0.0