com.ibm.mq.exits

Class MQCSP

  • java.lang.Object
    • com.ibm.mq.jmqi.JmqiObject
      • com.ibm.mq.jmqi.internal.AbstractMqiStructure
        • com.ibm.mq.exits.MQCSP
  • All Implemented Interfaces:
    com.ibm.mq.jmqi.internal.MqiStructure, java.lang.Cloneable


    public class MQCSP
    extends com.ibm.mq.jmqi.internal.AbstractMqiStructure
    implements java.lang.Cloneable
    MQCSP structure struct tagMQCSP { MQCHAR4 StrucId; MQLONG Version; MQLONG AuthenticationType; MQBYTE4 Reserved1; MQPTR CSPUserIdPtr; MQLONG CSPUserIdOffset; MQLONG CSPUserIdLength; MQBYTE8 Reserved2; MQPTR CSPPasswordPtr; MQLONG CSPPasswordOffset; MQLONG CSPPasswordLength; MQBYTE8 Reserved3; MQPTR InitialKeyPtr MQLONG InitialKeyOffset MQLONG InitialKeyLength MQBYTE8 Reserved4; MQPTR TokenPtr MQLONG TokenOffset MQLONG TokenLength };
    • Field Summary

      • Fields inherited from class com.ibm.mq.jmqi.JmqiObject

        COMP_JM, COMP_JN, COMP_JO
      • Fields inherited from interface com.ibm.mq.jmqi.internal.MqiStructure

        sccsid
    • Constructor Summary

      Constructors 
      Constructor and Description
      MQCSP(com.ibm.mq.jmqi.JmqiEnvironment env)
      Make a new MQCSP object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addFieldsToFormatter(com.ibm.mq.jmqi.internal.JmqiStructureFormatter fmt)
      Template method to populate a structure formatter with field definitions.
      java.lang.Object clone()
      Clone this MQCSP.
      boolean equals(java.lang.Object object)
      Compare two MQCSP structures
      int getAuthenticationType() 
      java.lang.String getCspPassword() 
      java.lang.String getCspUserId() 
      int getCurrentVersion() 
      java.lang.String getInitialKey() 
      int getRequiredBufferSize(int ptrSize, com.ibm.mq.jmqi.system.JmqiCodepage cp) 
      int getSize(int ptrSize)
      The byte size of the structure
      static int getSize(com.ibm.mq.jmqi.JmqiEnvironment env, int version, int ptrSize)
      The byte size of the fixed part of the structure
      static int getSizeV1(int ptrSize) 
      static int getSizeV2(int ptrSize) 
      static int getSizeV3(int ptrSize) 
      java.lang.String getToken() 
      int getVersion() 
      int hashCode()
      Generate a hashcode.
      int readFromBuffer(byte[] buffer, int offset, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) 
      void setAuthenticationType(int authenticationType) 
      void setCspPassword(java.lang.String cspPassword) 
      void setCspUserId(java.lang.String cspUserId) 
      void setInitialKey(java.lang.String initialKey) 
      void setToken(java.lang.String token) 
      void setVersion(int version) 
      void validate()
      Validates MQCSP structures
      int writeToBuffer(byte[] buffer, int offset, boolean obscure, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) 
      int writeToBuffer(byte[] buffer, int offset, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) 
      int writeToTraceBuffer(byte[] buffer, int pos, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) 
      • Methods inherited from class com.ibm.mq.jmqi.internal.AbstractMqiStructure

        getFirstVersion, getMaximumRequiredBufferSize, getRequiredInputBufferSize, readFromBuffer, setupForTest, toString, toStringMultiLine, toTraceString, writeToBuffer
      • Methods inherited from class com.ibm.mq.jmqi.JmqiObject

        getJmqiEnvironment
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MQCSP

        public MQCSP(com.ibm.mq.jmqi.JmqiEnvironment env)
        Make a new MQCSP object
        Parameters:
        env -
    • Method Detail

      • getCurrentVersion

        public int getCurrentVersion()
        Specified by:
        getCurrentVersion in interface com.ibm.mq.jmqi.internal.MqiStructure
        Overrides:
        getCurrentVersion in class com.ibm.mq.jmqi.internal.AbstractMqiStructure
        Returns:
        the current version
      • getSizeV1

        public static int getSizeV1(int ptrSize)
        Parameters:
        ptrSize -
        Returns:
        The size of the Version 1 fields, including the end-of-structure alignment
      • getSizeV2

        public static int getSizeV2(int ptrSize)
        Parameters:
        ptrSize -
        Returns:
        The size of the Version 2 fields, including the end-of-structure alignment
      • getSizeV3

        public static int getSizeV3(int ptrSize)
        Parameters:
        ptrSize -
        Returns:
        The size of the Version 3 fields, including the end-of-structure alignment
      • getSize

        public int getSize(int ptrSize)
                    throws JmqiException
        The byte size of the structure
        Specified by:
        getSize in interface com.ibm.mq.jmqi.internal.MqiStructure
        Overrides:
        getSize in class com.ibm.mq.jmqi.internal.AbstractMqiStructure
        Parameters:
        ptrSize -
        Returns:
        The byte size of the structure
        Throws:
        JmqiException
      • getSize

        public static int getSize(com.ibm.mq.jmqi.JmqiEnvironment env,
                                  int version,
                                  int ptrSize)
                           throws JmqiException
        The byte size of the fixed part of the structure
        Parameters:
        env -
        version -
        ptrSize -
        Returns:
        The byte size of the structure in the specified environment
        Throws:
        JmqiException
      • getRequiredBufferSize

        public int getRequiredBufferSize(int ptrSize,
                                         com.ibm.mq.jmqi.system.JmqiCodepage cp)
                                  throws JmqiException
        Specified by:
        getRequiredBufferSize in interface com.ibm.mq.jmqi.internal.MqiStructure
        Parameters:
        ptrSize -
        cp -
        Returns:
        required buffer size
        Throws:
        JmqiException
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone this MQCSP.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A copy of the MQCSP object
        Throws:
        java.lang.CloneNotSupportedException
      • hashCode

        public int hashCode()
        Generate a hashcode.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashcode
      • equals

        public boolean equals(java.lang.Object object)
        Compare two MQCSP structures
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object -
        Returns:
        'true' if the object are equal
      • getVersion

        public int getVersion()
        Specified by:
        getVersion in interface com.ibm.mq.jmqi.internal.MqiStructure
        Overrides:
        getVersion in class com.ibm.mq.jmqi.internal.AbstractMqiStructure
        Returns:
        version
      • setVersion

        public void setVersion(int version)
        Specified by:
        setVersion in interface com.ibm.mq.jmqi.internal.MqiStructure
        Overrides:
        setVersion in class com.ibm.mq.jmqi.internal.AbstractMqiStructure
        Parameters:
        version -
      • getAuthenticationType

        public int getAuthenticationType()
        Returns:
        authenticationType
      • setAuthenticationType

        public void setAuthenticationType(int authenticationType)
        Parameters:
        authenticationType -
      • getCspUserId

        public java.lang.String getCspUserId()
        Returns:
        the cspUserId
      • setCspUserId

        public void setCspUserId(java.lang.String cspUserId)
        Parameters:
        cspUserId -
      • getCspPassword

        public java.lang.String getCspPassword()
        Returns:
        the cspPassword
      • setCspPassword

        public void setCspPassword(java.lang.String cspPassword)
        Parameters:
        cspPassword -
      • getInitialKey

        public java.lang.String getInitialKey()
        Returns:
        the initialKey
      • setInitialKey

        public void setInitialKey(java.lang.String initialKey)
        Parameters:
        initialKey -
      • getToken

        public java.lang.String getToken()
        Returns:
        the token
      • setToken

        public void setToken(java.lang.String token)
        Parameters:
        token -
      • writeToTraceBuffer

        public int writeToTraceBuffer(byte[] buffer,
                                      int pos,
                                      int ptrSize,
                                      boolean swap,
                                      com.ibm.mq.jmqi.system.JmqiCodepage cp,
                                      com.ibm.mq.jmqi.system.JmqiTls tls)
                               throws JmqiException
        Specified by:
        writeToTraceBuffer in interface com.ibm.mq.jmqi.internal.MqiStructure
        Overrides:
        writeToTraceBuffer in class com.ibm.mq.jmqi.internal.AbstractMqiStructure
        Throws:
        JmqiException
        See Also:
        MqiStructure.writeToTraceBuffer(byte[], int, int, boolean, JmqiCodepage, JmqiTls)
      • writeToBuffer

        public int writeToBuffer(byte[] buffer,
                                 int offset,
                                 int ptrSize,
                                 boolean swap,
                                 com.ibm.mq.jmqi.system.JmqiCodepage cp,
                                 com.ibm.mq.jmqi.system.JmqiTls tls)
                          throws JmqiException
        Specified by:
        writeToBuffer in interface com.ibm.mq.jmqi.internal.MqiStructure
        Throws:
        JmqiException
        See Also:
        MqiStructure.writeToBuffer(byte[], int, int, boolean, JmqiCodepage, JmqiTls)
      • writeToBuffer

        public int writeToBuffer(byte[] buffer,
                                 int offset,
                                 boolean obscure,
                                 int ptrSize,
                                 boolean swap,
                                 com.ibm.mq.jmqi.system.JmqiCodepage cp,
                                 com.ibm.mq.jmqi.system.JmqiTls tls)
                          throws JmqiException
        Parameters:
        buffer -
        offset -
        obscure -
        ptrSize -
        swap -
        cp -
        tls -
        Returns:
        position
        Throws:
        JmqiException
      • readFromBuffer

        public int readFromBuffer(byte[] buffer,
                                  int offset,
                                  int ptrSize,
                                  boolean swap,
                                  com.ibm.mq.jmqi.system.JmqiCodepage cp,
                                  com.ibm.mq.jmqi.system.JmqiTls tls)
                           throws JmqiException
        Specified by:
        readFromBuffer in interface com.ibm.mq.jmqi.internal.MqiStructure
        Throws:
        JmqiException
        See Also:
        MqiStructure.readFromBuffer(byte[], int, int, boolean, JmqiCodepage, JmqiTls)
      • addFieldsToFormatter

        public void addFieldsToFormatter(com.ibm.mq.jmqi.internal.JmqiStructureFormatter fmt)
        Template method to populate a structure formatter with field definitions. This method is used in the "toString()" method
        Specified by:
        addFieldsToFormatter in interface com.ibm.mq.jmqi.internal.MqiStructure
        Parameters:
        fmt - The structure formatter
(c) Copyright IBM Corp. 2008, 2016. All Rights Reserved.