|
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
This class is used to create an attribute object. This object contains the mechanisms to perform authentication, encryption and compression. MQeAttribute objects can be associated with queues, messages, and MQeFields objects.
Field Summary |
Constructor Summary | |
MQeAttribute()
Constructs an empty MQeAttribute object (not activated). |
|
MQeAttribute(MQeAttributeRule rule,
MQeAuthenticator authenticator,
MQeCryptor cryptor,
MQeCompressor compressor)
Master attribute constructor with rules object as parameter. |
|
MQeAttribute(MQeAuthenticator authenticator,
MQeCryptor cryptor,
MQeCompressor compressor)
Constructs an MQeAttribute object. |
Method Summary | |
void |
activate(MQeAttributeRule rule,
MQeAuthenticator authenticator,
MQeCryptor cryptor,
MQeCompressor compressor)
Activates an MQeAttribute object. |
java.lang.String |
authenticatedID()
Returns a String that is the authenticated identifier. |
void |
close()
Closes and releases resources (including that used by its components). |
MQeAuthenticator |
getAuthenticator()
Gets the object reference to the authenticator. |
MQeCompressor |
getCompressor()
Gets the object reference to the compressor. |
MQeCryptor |
getCryptor()
Gets the object reference to the cryptor. |
MQeAttributeRule |
getRule()
Gets the object reference to the rule. |
boolean |
isAcceptable(MQeAttribute item)
Checks if the input attribute is acceptable as a replacement. |
protected void |
setAuthenticator(MQeAuthenticator authenticator)
Sets an authenticator with the attribute. |
protected void |
setCompressor(MQeCompressor compr)
Sets a compressor with the attribute. |
protected void |
setCryptor(MQeCryptor crypt)
Sets a cryptor with the attribute. |
void |
setKey(MQeKey key)
Associates a key with the attribute. |
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 MQeAttribute()
Constructs an empty MQeAttribute object (not activated).
public MQeAttribute(MQeAuthenticator authenticator, MQeCryptor cryptor, MQeCompressor compressor)
Constructs an MQeAttribute object.
authenticator
- An MQeAuthenticator object (or null) used to
authenticatate data access.cryptor
- An MQeCryptor object (or null) used to encrypt
and decrypt data.compressor
- An MQeCompressor object used to compress the data
prior to encrytion, or decompress after decryption.
MQeException
- Various activation errors.
IOException
- Various IO errors depending on protocol type.import com.ibm.mqe.MQeAttribute; try { MQeAttribute myAttribute = new MQeAttribute(null, new MQeXorCryptor(), new MQeRleCompressor()); } catch (Exception e) { System.err.println("Failure ! " + e.toString()); }
public MQeAttribute(MQeAttributeRule rule, MQeAuthenticator authenticator, MQeCryptor cryptor, MQeCompressor compressor)
Master attribute constructor with rules object as parameter.
rule
- An MQeAttributeRule objec (or null) use to verify that various
operations are permitted.authenticator
- An MQeAuthenticator object (or null) used to
authenticatate data access.cryptor
- An MQeCryptor object (or null) used to encrypt
and decrypt data.compressor
- An MQeCompressor object used to compress the data
prior to encrytion, or decompress after decryption.
MQeException
- Various activation errors.
IOException
- Various IO errors depending on protocol type.Method Detail |
public void activate(MQeAttributeRule rule, MQeAuthenticator authenticator, MQeCryptor cryptor, MQeCompressor compressor)
Activates an MQeAttribute object.
Attaches the specified rule, cryptor, and compressor to the attribute (any rule, cryptor, and compressor already attached is replaced).
rule
- An MQeAttributeRule objec (or null) use to verify that various
operations are permitted. If null is specified, then the default rule of
MQeAttributeRule
is assumed.authenticator
- An MQeAuthenticator object (or null) used to
authenticatate data access.cryptor
- An MQeCryptor object (or null) used to encrypt
and decrypt data.compressor
- An MQeCompressor object used to compress the data
prior to encrytion, or decompress after decryption.
MQeException
- Various activation errors.
IOException
- Various IO errors depending on protocol type.MQeAttribute myAttribute = null; try { myAttribute = new MQeAttribute(); } catch (Exception e) { System.err.println("Failure ! ".toString()); } myAttribute.activate(null, authenticator, cryptor, compressor);
public java.lang.String authenticatedID()
Returns a String that is the authenticated identifier.
This method returns a String that is the authenticated identifier, or null if it is not authenticated. This indicates if an authentication has been successfully completed.
String result = null; MQeAttribute attr = new MQeAttribute(); result = attr.authenticatedID();
public void close()
Closes and releases resources (including that used by its components).
This method should be called by applications after the attribute is not longer needed.
public boolean isAcceptable(MQeAttribute item)
Checks if the input attribute is acceptable as a replacement.
item
- A replacement MQeAttribute object.
MQeAttribute attrib = new MQeAttribute(); if (attrib.isAcceptable(attr)) {// The input attribute, attr - is acceptable. } else { Accept = false; }
public MQeAuthenticator getAuthenticator()
Gets the object reference to the authenticator.
This method is called to return the object reference to the authenticator used by this attribute, or null if there is no authenticator.
MQeAttribute attr = new MQeAttribute(); auth = attr.getAuthenticator();
public MQeCompressor getCompressor()
Gets the object reference to the compressor.
This method is called to return the object reference to the compressor used by this attribute, or null if there is no compressor.
MQeAttribute attr = new MQeAttribute(); comp = attr.getCompressor();
public MQeCryptor getCryptor()
Gets the object reference to the cryptor.
This method is called to return the object reference to the cryptor used by this attribute, or null if there is no cryptor.
MQeAttribute attr = new MQeAttribute(); crypt = attr.getCryptor();
public MQeAttributeRule getRule()
Gets the object reference to the rule.
This method is called to return the object reference to the rule used by this attribute, or null if there is no rule.
MQeAttribute attr = new MQeAttribute(); AttRule = attr.getRule();
protected void setAuthenticator(MQeAuthenticator authenticator)
Sets an authenticator with the attribute.
This method associates an authenticator with the attribute.
authenticator
- Authenticator to be used with the attribute.protected void setCryptor(MQeCryptor crypt)
Sets a cryptor with the attribute.
This method associates a cryptor with the attribute.
protected void setCompressor(MQeCompressor compr)
Sets a compressor with the attribute.
This method associates a compressor with the attribute.
public void setKey(MQeKey key) throws MQeException
Associates a key with the attribute.
This method associates a key with the attribute. This is required if the attribute has a cryptor. Once set, the key cannot be re-set.
key
- The key object to be used with the attribute’s cryptor.
MQeException
- Except_NotAllowed , thrown if the key has already
been set.MQeAttribute attr = new MQeAttribute(); key = new MQeKey(); key.setLocalKey("It_is_a_secret"); attr.setKey(key);
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |