com.ibm.cics.server

Class WSAContext



  • public class WSAContext
    extends API

    WS-Addressing context inteface. This class implements a number of methods to set and get data from the addressing contexts attached to the current requester or provider application. Namespace http://www.w3.org/2005/08/addressing.

    See Also:
    com.ibm.cics.server.API for general restrictions on using the JCICS API.
    Since CICS TS version:
    4.1
    Since package version:
    1.200
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int FAULTTOEPR
      EPRTYPE cvda value FAULTTOEPR
      static int FROMEPR
      EPRTYPE cvda value FROMEPR
      static int REPLYTOEPR
      EPRTYPE cvda value REPLYTOEPR
      static int REQCONTEXT
      Request Context cvda value
      static int RESPCONTEXT
      Response Context cvda value
      static int TOEPR
      EPRTYPE cvda value TOEPR
    • Constructor Summary

      Constructors 
      Constructor and Description
      WSAContext() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void delete()
      Deletes WS-Addressing request and response contexts.
      static void delete(java.lang.String channel)
      Deletes WS-Addressing request and response contexts.
      java.lang.String getAction(int contextType)
      Gets the action MAP from the specified addressing context.
      java.lang.String getChannel()
      Gets the name of the channel which contains the addressing contexts.
      java.lang.String getEpr(int contextType, int eprType)
      Gets the complete EPR from the specified addressing context for the specified EPR type.
      java.lang.String getEprAddress(int contextType, int eprType)
      Gets the EPR address from the specified addressing context for the specified EPR.
      java.lang.String getEprMetadata(int contextType, int eprType)
      Gets the EPR metadata from the specified addressing context for the specified EPR.
      java.lang.String getEprRefParms(int contextType, int eprType)
      Gets the EPR Reference parameters from the specified addressing context for the specified EPR.
      java.lang.String getMessageId(int contextType)
      Gets the messageId MAP from the specified addressing context.
      java.lang.String getNationalLang()
      Gets the national language if previously set.
      java.util.Map<java.lang.String,java.lang.String> getRelatesTo(int contextType)
      Gets a Map of relatesTo MAPs from the specified addressing context.
      void setAction(java.lang.String action)
      Sets the action MAP in the request addressing context.
      void setChannel(java.lang.String channel)
      Sets the name of the channel which contains the addressing contexts.
      void setEpr(int eprType, java.lang.String epr)
      Sets the complete EPR in the request addressing context for the specified EPR type.
      void setEprAddress(int eprType, java.lang.String address)
      Sets the EPR address in the request addressing context for the specified EPR.
      void setEprMetadata(int eprType, java.lang.String metadata)
      Sets the EPR metadata in the request addressing context for the specified EPR.
      void setEprRefParms(int eprType, java.lang.String refparms)
      Sets the EPR reference parameters in the request addressing context for the specified EPR.
      void setMessageId(java.lang.String messageId)
      Sets the messageId MAP in the request addressing context.
      void setNationalLang(java.lang.String natlang)
      Sets the national language to use when building the addressing context.
      void setRelatesTo(java.lang.String relatesURI)
      Sets a relatesTo MAP in the request addressing context consisting of a URI.
      void setRelatesTo(java.lang.String relatesURI, java.lang.String relatesType)
      Sets a relatesTo MAP in the request addressing context consisting of a URI and type URI.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FROMEPR

        public static final int FROMEPR
        EPRTYPE cvda value FROMEPR
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • TOEPR

        public static final int TOEPR
        EPRTYPE cvda value TOEPR
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • REPLYTOEPR

        public static final int REPLYTOEPR
        EPRTYPE cvda value REPLYTOEPR
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • FAULTTOEPR

        public static final int FAULTTOEPR
        EPRTYPE cvda value FAULTTOEPR
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • REQCONTEXT

        public static final int REQCONTEXT
        Request Context cvda value
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • RESPCONTEXT

        public static final int RESPCONTEXT
        Response Context cvda value
        See Also:
        Constant Field Values
        Since CICS TS version:
        4.1
        Since package version:
        1.200
    • Constructor Detail

      • WSAContext

        public WSAContext()
    • Method Detail

      • getChannel

        public java.lang.String getChannel()
        Gets the name of the channel which contains the addressing contexts. This method is local and returns value previously set by setChannel, it does not return the default channel name set by the pipeline.
        Returns:
        String The local channel name used to locate the addressing contexts.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setChannel

        public void setChannel(java.lang.String channel)
        Sets the name of the channel which contains the addressing contexts. This is used to locate the addressing contexts on all other method calls. If not supplied the default channel is used if available.
        Parameters:
        channel - The channel name to use to locate the addressing contecxt.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getNationalLang

        public java.lang.String getNationalLang()
        Gets the national language if previously set.
        Returns:
        String The national language used to build the addressing contexts.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setNationalLang

        public void setNationalLang(java.lang.String natlang)
        Sets the national language to use when building the addressing context. This must be set before MAP set methods are invoked.
        Parameters:
        natlang - The national language to use to build the addressing contects.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getRelatesTo

        public java.util.Map<java.lang.String,java.lang.String> getRelatesTo(int contextType)
                                                                      throws java.lang.IllegalArgumentException,
                                                                             InvalidRequestException,
                                                                             CCSIDErrorException,
                                                                             RecordNotFoundException,
                                                                             ChannelErrorException
        Gets a Map of relatesTo MAPs from the specified addressing context. A maximum of 1024 relatesTo MAPs are returned.
        Parameters:
        contextType - The cvda context type. e.g. WSAContext.REQCONTEXT.
        Returns:
        Map A MAP of Keys and entities. Where the key is the relatesTo messageId URI and the value the relatesTo type URI of the related message.
        Throws:
        java.lang.IllegalArgumentException - The contextType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        RecordNotFoundException - The addressing context could not be located.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setRelatesTo

        public void setRelatesTo(java.lang.String relatesURI,
                                 java.lang.String relatesType)
                          throws InvalidRequestException,
                                 CCSIDErrorException,
                                 ChannelErrorException
        Sets a relatesTo MAP in the request addressing context consisting of a URI and type URI.
        Parameters:
        relatesURI - The messageId URI of the related message to set.
        relatesType - The type of relationship with the related message.
        Throws:
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getEprAddress

        public java.lang.String getEprAddress(int contextType,
                                              int eprType)
                                       throws java.lang.IllegalArgumentException,
                                              InvalidRequestException,
                                              CCSIDErrorException,
                                              RecordNotFoundException,
                                              ChannelErrorException
        Gets the EPR address from the specified addressing context for the specified EPR.
        Parameters:
        contextType - The cvda context type. e.g. WSAContext.REQCONTEXT.
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        Returns:
        String The address of the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The contextType or eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        RecordNotFoundException - The addressing context could not be located.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setEprAddress

        public void setEprAddress(int eprType,
                                  java.lang.String address)
                           throws java.lang.IllegalArgumentException,
                                  InvalidRequestException,
                                  CCSIDErrorException,
                                  ChannelErrorException
        Sets the EPR address in the request addressing context for the specified EPR.
        Parameters:
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        address - The address URI to set in the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getEprRefParms

        public java.lang.String getEprRefParms(int contextType,
                                               int eprType)
                                        throws java.lang.IllegalArgumentException,
                                               InvalidRequestException,
                                               CCSIDErrorException,
                                               RecordNotFoundException,
                                               ChannelErrorException
        Gets the EPR Reference parameters from the specified addressing context for the specified EPR.
        Parameters:
        contextType - The cvda context type. e.g. WSAContext.REQCONTEXT.
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        Returns:
        String Any reference parameters xml of the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The contextType or eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        RecordNotFoundException - The addressing context could not be located.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setEprRefParms

        public void setEprRefParms(int eprType,
                                   java.lang.String refparms)
                            throws java.lang.IllegalArgumentException,
                                   InvalidRequestException,
                                   CCSIDErrorException,
                                   ChannelErrorException
        Sets the EPR reference parameters in the request addressing context for the specified EPR. The reference parameters must be in fully qualified XML.
        Parameters:
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        refparms - The reference parameter xml to set in the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getEprMetadata

        public java.lang.String getEprMetadata(int contextType,
                                               int eprType)
                                        throws java.lang.IllegalArgumentException,
                                               InvalidRequestException,
                                               CCSIDErrorException,
                                               RecordNotFoundException,
                                               ChannelErrorException
        Gets the EPR metadata from the specified addressing context for the specified EPR.
        Parameters:
        contextType - The cvda context type. e.g. WSAContext.REQCONTEXT.
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        Returns:
        String Any metadata xml of the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The contextType or eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        RecordNotFoundException - The addressing context could not be located.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setEprMetadata

        public void setEprMetadata(int eprType,
                                   java.lang.String metadata)
                            throws java.lang.IllegalArgumentException,
                                   InvalidRequestException,
                                   CCSIDErrorException,
                                   ChannelErrorException
        Sets the EPR metadata in the request addressing context for the specified EPR. The reference parameters must be in fully qualified XML.
        Parameters:
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        metadata - The metadata xml to set in the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • getEpr

        public java.lang.String getEpr(int contextType,
                                       int eprType)
                                throws java.lang.IllegalArgumentException,
                                       InvalidRequestException,
                                       CCSIDErrorException,
                                       RecordNotFoundException,
                                       ChannelErrorException
        Gets the complete EPR from the specified addressing context for the specified EPR type.
        Parameters:
        contextType - The cvda context type. e.g. WSAContext.REQCONTEXT.
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        Returns:
        String The complete EPR xml of the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The contextType or eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        RecordNotFoundException - The addressing context could not be located.
        Since CICS TS version:
        4.1
        Since package version:
        1.200
      • setEpr

        public void setEpr(int eprType,
                           java.lang.String epr)
                    throws java.lang.IllegalArgumentException,
                           InvalidRequestException,
                           CCSIDErrorException,
                           ChannelErrorException
        Sets the complete EPR in the request addressing context for the specified EPR type. The EPR must be in fully qualified XML.
        Parameters:
        eprType - The cvda EPR type of the EPR to set in the context. e.g. WSAContext.TOEPR.
        epr - The epr xml to set in the specified EPR.
        Throws:
        java.lang.IllegalArgumentException - The eprType is not valid.
        ChannelErrorException - A problem locating the channel occured.
        CCSIDErrorException - An exception occurred translating character sets.
        InvalidRequestException - A problem exists with the request data.
        Since CICS TS version:
        4.1
        Since package version:
        1.200