|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--com.ibm.mqe.MQeAttribute | +--com.ibm.mqe.attributes.MQeMAttribute
This class is used to create an attribute object enabling simple message-level protection when attached to a message.
This class is a descendant of MQeAttribute
.
Field Summary |
Constructor Summary | |
MQeMAttribute(MQeAuthenticator auth,
MQeCryptor crypt,
MQeCompressor compr)
Constructs an MQeMAttribute object. |
Methods inherited from class com.ibm.mqe.MQeAttribute |
activate, authenticatedID, close, getAuthenticator, getCompressor, getCryptor, getRule, isAcceptable, setAuthenticator, setCompressor, setCryptor, setKey |
Methods inherited from class com.ibm.mqe.MQe |
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MQeMAttribute(MQeAuthenticator auth, MQeCryptor crypt, MQeCompressor compr) throws java.lang.Exception
Constructs an MQeMAttribute object.
auth
- null, not usedcrypt
- An object reference to a symmetric MQeCryptor object
(MQeDESCryptor, MQe3DESCryptor, MQeRC4Cryptor, MQeRC6Cryptor or MQeMARSCryptor)compr
- null or an object reference to a MQeCompressor object
(MQeRleCompressor or MQeLZWCompressor)
MQeException
- java.lang.Exception
MQeAttribute
public void ConstructorExample()throws Exception { MQeMsgObject MsgObj = null; // application on initiating QueueManager: // -prepare to use MQeMAttribute with Rle Compressor // and DES Cryptor with key =It_is_a_secret { MQeKey localkey = new MQeKey(); localkey.setLocalKey("It_is_a_secret"); MQeDESCryptor des = new MQeDESCryptor(); MQeRleCompressor rle = new MQeRleCompressor(); MQeMAttribute protMAttr = new MQeMAttribute(null, des, rle); protMAttr.setKey(localkey); // construct Message and protect with the MQeMAttribute MsgObj = new MQeMsgObject(); MsgObj.setAttribute(protMAttr); // add test message data MsgObj.putAscii("MsgData", "0123456789abcdef...."); System.out.println("input message data =" + MsgObj.getAscii("MsgData")); } // assume MQeQueueManager instance initQM started,PutMessage initQM.putMessage(targetQMgrName, targetQName, MsgObj, null, 0); // application on recipient QueueManager: // -prepare to use MQeMAttribute with key =It_is_a_secret { MQeKey localkey = new MQeKey(); localkey.setLocalKey("It_is_a_secret"); MQeDESCryptor des = new MQeDESCryptor(); MQeRleCompressor rle = new MQeRleCompressor(); MQeMAttribute protMAttr = new MQeMAttribute(null, des, rle); protMAttr.setKey(localkey); // assume MQeQueueManager instance recipQM started,GetMessage MsgObj = initQM.getMessage(targetQMgrName, targetQName, null, protMAttr, 0); System.out.println("output message data =" + MsgObj.getAscii("MsgData")); } }
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |