|
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.registry.MQeRegistry | +--com.ibm.mqe.registry.MQePublicRegistry
A public registry.
Field Summary |
Fields inherited from class com.ibm.mqe.registry.MQeRegistry |
Adapter, CAIPAddrPort, CertReqPIN, DirName, FileRegistry, KeyRingPassword, LocalRegType, PIN, PrivateRegistry, Separator |
Fields inherited from interface com.ibm.mqe.MQePropertyProvider |
version |
Constructor Summary | |
MQePublicRegistry()
Constructs an MQePublicRegistry object. |
Method Summary | |
void |
activate(java.lang.String name,
java.lang.String dirName)
Opens and activates the MQePublicRegistry instance. |
void |
close()
Close the registry. |
void |
deleteCertificate(java.lang.String certificateOwner)
Deletes the certificate owner's mini-certificate. |
MQeFields |
getCertificate(java.lang.String certificateOwner)
Returns the certificate owner's mini-certificate. |
void |
putCertificate(java.lang.String certificateOwner,
MQeFields certificate)
Adds the certificate owner’s mini-certificate to the public registry. |
MQeFields |
requestCertificate(java.lang.String entity,
java.lang.String mqeNodeAddrPort,
java.lang.String adapter)
Requests a mini-certificate from the public registry of another WebSphere MQ Everyplace node, and, if returned, saves it in this public registry. |
void |
shareCertificate(java.lang.String entity,
MQeFields minicertf,
java.lang.String mqeNodeAddrPort,
java.lang.String adapter)
Replicates the certificate owner's mini-certificate to a public registry on another WebSphere MQ Everyplace node. |
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 |
Methods inherited from interface com.ibm.mqe.MQePropertyProvider |
getProperty |
Constructor Detail |
public MQePublicRegistry()
Constructs an MQePublicRegistry object.
MQePrivateRegistry
Method Detail |
public MQeFields getCertificate(java.lang.String certificateOwner) throws MQeException
Returns the certificate owner's mini-certificate.
certificateOwner
- Authenticatable entity's (mini-certificate owner's) name.
MQeException
- Except_Reg_ReaddFailed, 'Error reading entry'deleteCertificate(java.lang.String)
,
putCertificate(java.lang.String, com.ibm.mqe.MQeFields)
public void activate(java.lang.String name, java.lang.String dirName) throws MQeException
Opens and activates the MQePublicRegistry instance. If a public registry with this entity name exists, activate opens the existing public registry, if not it creates a new public registry with name.
name
- Public registry name, normally MQeNode_PublicRegistrydirName
- Path to public registry
MQeException
- Except_Public_ActivateFailed, 'exception reason'try { // setup Public Registry activate parameters String name = "MQeNode_PublicRegistry"; String dirName = ".//"; // instantiate and activate Public Registry MQePublicRegistry pubreg = new MQePublicRegistry(); pubreg.activate(name, dirName); } catch (Exception e) {// Handle the exception here }
public void deleteCertificate(java.lang.String certificateOwner) throws java.lang.Exception
Deletes the certificate owner's mini-certificate.
certificateOwner
- Authenticatable entity's (mini-certificate owner's) name.
java.lang.Exception
- public void putCertificate(java.lang.String certificateOwner, MQeFields certificate) throws java.lang.Exception
Adds the certificate owner’s mini-certificate to the public registry.
certificateOwner
- Authenticatable entity's (mini-certificate owner's) namecertificate
- Owner's mini-certificate
java.lang.Exception
- Except_Reg_AddFailed, 'Error adding entry'deleteCertificate(java.lang.String)
,
getCertificate(java.lang.String)
public MQeFields requestCertificate(java.lang.String entity, java.lang.String mqeNodeAddrPort, java.lang.String adapter) throws java.lang.Exception
Requests a mini-certificate from the public registry of another WebSphere MQ Everyplace node, and, if returned, saves it in this public registry.
entity
- Authenticatable entity's (mini-certificate owner's) name.mqeNodeAddrPort
- TCP address and port of home-server of alternative
WebSphere MQ Everyplace node.adapter
- The adapter class name or alias of the target queue manager.
java.lang.Exception
- shareCertificate(java.lang.String, com.ibm.mqe.MQeFields, java.lang.String, java.lang.String)
try { // setup RequestCertificate parameters String homeServerAddrPort = "homeServer.hursley.ibm.com:8082"; String entityName = "Bruce"; // instantiate and activate Public Registry MQePublicRegistry pubreg = new MQePublicRegistry(); pubreg.activate("MQeNode_PublicRegistry", ".\\"); // request Bruce's MiniCert from Public Reg on another MQeNode MQeFields minicertf = pubreg.getCertificate(entityName); pubreg.close(); } catch (Exception e) {// Handle the error here. }
public void shareCertificate(java.lang.String entity, MQeFields minicertf, java.lang.String mqeNodeAddrPort, java.lang.String adapter) throws java.lang.Exception
Replicates the certificate owner's mini-certificate to a public registry on another WebSphere MQ Everyplace node.
entity
- Authenticatable entity's (mini-certificate owner's) name.minicertf
- Mini-certificatemqeNodeAddrPort
- TCP address and port of home-server of alternative
WebSphere MQ Everyplace node.adapter
- The adapter class name .
java.lang.Exception
- requestCertificate(java.lang.String, java.lang.String, java.lang.String)
try { // instantiate &activate a Private Reg for Auth Entity Bruce String entityName = "Bruce"; String caIPAddrPort = "aname.hursley.ibm.com:8082"; MQePrivateRegistry preg = new MQePrivateRegistry(); preg.activate(entityName, ".\\MQeNode_PrivateRegistry", "12345678", "It_is_a_secret", "12345678", caIPAddrPort); // instantiate and activate Public Reg &save Bruce's MiniCert MQePublicRegistry pubreg = new MQePublicRegistry(); pubreg.activate("MQeNode_PublicRegistry", ".\\MQeNode_PublicRegistry"); pubreg.putCertificate(entityName, preg.getCertificate(entityName)); // share Bruce's MiniCert with Public Reg on another MQeNode String homeServerAddrPort = "homeServer.hursley.ibm.com:8082"; pubreg.shareCertificate(entityName, preg.getCertificate(entityName), homeServerAddrPort, "Network"); preg.close(); pubreg.close(); } catch (Exception e) {//Handle the exception here. }
public void close()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |