Package 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,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_JOFields inherited from interface com.ibm.mq.jmqi.internal.MqiStructure
sccsid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldsToFormatter(com.ibm.mq.jmqi.internal.JmqiStructureFormatter fmt) Template method to populate a structure formatter with field definitions.clone()Clone this MQCSP.booleanCompare two MQCSP structuresintGet authentication type.Get the password used in authenticationGet the user ID used in authenticationintGet the initial key for the password protection systemintgetRequiredBufferSize(int ptrSize, com.ibm.mq.jmqi.system.JmqiCodepage cp) Get the required buffer size for the data in this structure.intgetSize(int ptrSize) The byte size of the structurestatic intgetSize(com.ibm.mq.jmqi.JmqiEnvironment env, int version, int ptrSize) The byte size of the fixed part of the structurestatic intgetSizeV1(int ptrSize) Get the size of version of MQCSPstatic intgetSizeV2(int ptrSize) Get field size of version 2 of MQCSPstatic intgetSizeV3(int ptrSize) Get the size of version 3 of MQCSPgetToken()Get the authentication token that is used for authentication with the queue managerintGet the version of MQCSPinthashCode()Generate a hashcode.intreadFromBuffer(byte[] buffer, int offset, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) voidsetAuthenticationType(int authenticationType) Set authentication type.voidsetCspPassword(String cspPassword) Set password to be used in authenticationvoidsetCspUserId(String cspUserId) Set the user ID to be used in authenticationvoidsetInitialKey(String initialKey) Set the initial key for the password protection systemvoidSet the authentication token that is used for authentication with the queue managervoidsetVersion(int version) Set MQCSP versionvoidvalidate()Validates the contents of MQCSPintwriteToBuffer(byte[] buffer, int offset, int ptrSize, boolean swap, com.ibm.mq.jmqi.system.JmqiCodepage cp, com.ibm.mq.jmqi.system.JmqiTls tls) intwriteToTraceBuffer(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, writeToBufferMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Constructor Details
-
MQCSP
public MQCSP(com.ibm.mq.jmqi.JmqiEnvironment env) Make a new MQCSP object- Parameters:
env- An instance of JmqiEnvironment class
-
-
Method Details
-
getCurrentVersion
public int getCurrentVersion()- Specified by:
getCurrentVersionin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Overrides:
getCurrentVersionin classcom.ibm.mq.jmqi.internal.AbstractMqiStructure- Returns:
- the current version of MQCSP
-
getSizeV1
public static int getSizeV1(int ptrSize) Get the size of version of MQCSP- Parameters:
ptrSize- The number of bytes to write for each pointer in the structure- Returns:
- The size of the Version 1 fields, including the end-of-structure alignment
-
getSizeV2
public static int getSizeV2(int ptrSize) Get field size of version 2 of MQCSP- Parameters:
ptrSize- The number of bytes to write for each pointer in the structure- Returns:
- The size of the Version 2 fields, including the end-of-structure alignment
-
getSizeV3
public static int getSizeV3(int ptrSize) Get the size of version 3 of MQCSP- Parameters:
ptrSize- The number of bytes to write for each pointer in the structure- Returns:
- The size of the Version 3 fields, including the end-of-structure alignment
-
getSize
The byte size of the structure- Specified by:
getSizein interfacecom.ibm.mq.jmqi.internal.MqiStructure- Overrides:
getSizein classcom.ibm.mq.jmqi.internal.AbstractMqiStructure- Parameters:
ptrSize- The number of bytes to write for each pointer in the structure- Returns:
- The byte size of the MQCSP structure
- Throws:
JmqiException- in case of any error
-
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- An instance of JmqiEnvironment classversion- of MQCSP.ptrSize- The number of bytes to write for each pointer in the structure- Returns:
- The byte size of the structure in the specified environment
- Throws:
JmqiException- in case of any error
-
getRequiredBufferSize
public int getRequiredBufferSize(int ptrSize, com.ibm.mq.jmqi.system.JmqiCodepage cp) throws JmqiException Get the required buffer size for the data in this structure.- Specified by:
getRequiredBufferSizein interfacecom.ibm.mq.jmqi.internal.MqiStructure- Parameters:
ptrSize- The number of bytes to write for each pointer in the structurecp- JmqiCodepage- Returns:
- required buffer size
- Throws:
JmqiException- in case of any error
-
clone
Clone this MQCSP.- Returns:
- A copy of the MQCSP object
- Throws:
CloneNotSupportedException- exception
-
hashCode
public int hashCode()Generate a hashcode. -
equals
Compare two MQCSP structures -
getVersion
public int getVersion()Get the version of MQCSP- Specified by:
getVersionin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Overrides:
getVersionin classcom.ibm.mq.jmqi.internal.AbstractMqiStructure- Returns:
- version of MQCSP
-
setVersion
public void setVersion(int version) Set MQCSP version- Specified by:
setVersionin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Overrides:
setVersionin classcom.ibm.mq.jmqi.internal.AbstractMqiStructure- Parameters:
version- of MQCSP
-
getAuthenticationType
public int getAuthenticationType()Get authentication type. Defines type of authentication to perform Valid values are MQCSP_AUTH_NONE, MQCSP_AUTH_USER_ID_AND_PWD and MQCSP_AUTH_ID_TOKEN- Returns:
- authenticationType set in MQCSP
-
setAuthenticationType
public void setAuthenticationType(int authenticationType) Set authentication type. Defines type of authentication to perform Valid values are MQCSP_AUTH_NONE, MQCSP_AUTH_USER_ID_AND_PWD and MQCSP_AUTH_ID_TOKEN- Parameters:
authenticationType- for MQCSP
-
getCspUserId
Get the user ID used in authentication- Returns:
- the cspUserId
-
setCspUserId
Set the user ID to be used in authentication- Parameters:
cspUserId- to MQCSP instance
-
getCspPassword
Get the password used in authentication- Returns:
- the cspPassword
-
setCspPassword
Set password to be used in authentication- Parameters:
cspPassword- password for authentication
-
getInitialKey
Get the initial key for the password protection system- Returns:
- the initialKey
-
setInitialKey
Set the initial key for the password protection system- Parameters:
initialKey- for password protection
-
getToken
Get the authentication token that is used for authentication with the queue manager- Returns:
- the token
-
setToken
Set the authentication token that is used for authentication with the queue manager- Parameters:
token- for authentication
-
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:
writeToTraceBufferin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Overrides:
writeToTraceBufferin classcom.ibm.mq.jmqi.internal.AbstractMqiStructure- Throws:
JmqiException- See Also:
-
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:
writeToBufferin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Throws:
JmqiException- See Also:
-
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:
readFromBufferin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Throws:
JmqiException- See Also:
-
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:
addFieldsToFormatterin interfacecom.ibm.mq.jmqi.internal.MqiStructure- Parameters:
fmt- The structure formatter
-
validate
Validates the contents of MQCSP- Throws:
JmqiException- if validation fails.
-