TIBCO EMS .NET API 10.3
TIBCO EMS .NET API 10.3
TIBCO.EMS.LdapLookupContext Class Reference

This class provides an interface used to search for and perform queries in a third-party LDAP server for EMS administered objects. More...

Inherits ILookupContext.

Public Member Functions

void AddSettings (Hashtable prop)
 Add or change the lookup context settings defined in a hash table. More...
 
object AddSettings (string propName, object propValue)
 Add or change a lookup context setting. More...
 
Object RemoveSettings (string propName)
 Remove a setting by name More...
 
object Lookup (string name)
 Lookup up an EMS administered object by name in an LDAP server. More...
 

Properties

Hashtable Settings [get]
 Return a copy of the current settings. More...
 

Detailed Description

This class provides an interface used to search for and perform queries in a third-party LDAP server for EMS administered objects.

Member Function Documentation

void TIBCO.EMS.LdapLookupContext.AddSettings ( Hashtable  prop)
inline

Add or change the lookup context settings defined in a hash table.

Settings are mainly connection parameters and lookup parameters.

Example: LdapLookupConsts.LDAP_SERVER_URL

Parameters
propThe hash table that contains the name-value pairs used to set the lookup context.
Exceptions
ArgumentExceptionIf the prop table is null
object TIBCO.EMS.LdapLookupContext.AddSettings ( string  propName,
object  propValue 
)
inline

Add or change a lookup context setting.

This method sets one lookup context property. If the property was previously set, this method modifies it and returns the old value.

Examples:LdapLookupConsts.LDAP_SERVER_URL LdapLookupConsts.LDAP_BASE_DN

Parameters
propNameSet this single property. See LdapLookupConsts.LDAP_BASE_DN for property names.
propValueSet the single property to this value.
Exceptions
ArgumentExceptionIf either property name or value are null.
object TIBCO.EMS.LdapLookupContext.Lookup ( string  name)
inline

Lookup up an EMS administered object by name in an LDAP server.

This is an implementation of ILookupContext.Lookup. The administered objects can be either EMS connection factories, topics, queues stored in a third-party LDAP server.

Note: Lookup of XA connection factories is not supported.

When looking up administered TLS connection factory object, because of certain differences in the .NET TLS implementation and Java/C TLS implementation certain parameters do not hold any relevance in the .NET world and are ignored.

The following values are supported.

  • ssl expected hostname is converted to targethostName
  • ssl client identity (only pkcs12 file)
  • ssl password for the private key in the pkcs12 file
  • ssl trace
  • ssl trusted

The following (not complete) is the list of values ignored when constructing the TLS connection factory object.

  • ssl verify host
  • ssl vendor
  • ssl verify host name
  • ssl issuer certs

The following shows how to create and LDAP lookup context object and lookup an object in an LDAP server:

Hashtable props = new Hashtable();
props.Add(LdapLookupConsts.LDAP_SERVER_URL", "ldap://adc1.na.tibco.com:10389");
props.Add(LdapLookupConsts.LDAP_BASE_DN", "ou=People,dc=users");
props.Add(LdapLookupConsts.LDAP_PRINCIPAL", "cn=Manager');
props.Add(LdapLookupConsts.LDAP_CREDENTIAL", "password");
props.Add(LdapLookupConsts.LDAP_SEARCH_SCOPE, "subtree");
props.Add(LdapLookupConsts.LDAP_CONN_TYPE", "ldaps");
LookupContextFactory lookupCtxFactory = new LookupContextFactory();
ILookupContext searcher = lookupCtxFactory.Create(LookupContextFactory.LDAP_CONTEXT, props);
TIBCO.EMS.Queue queue = (TIBCO.EMS.Queue)searcher.Lookup("theQueueName");
Parameters
nameLookup the object with this name.
Exceptions
NullReferenceExceptionIf the name is null.
ConfigurationExceptionIf any of the configuration parameters are missing.
NamingExceptionAny other error while establishing a connection to the ldap server or during lookup.
Object TIBCO.EMS.LdapLookupContext.RemoveSettings ( string  propName)
inline

Remove a setting by name

Implements ILookupContext.RemoveSettings.

Parameters
propNameRemove this property. For property names, see LdapLookupConsts.
Exceptions
ArgumentExceptionIf the property name is null.

Property Documentation

Hashtable TIBCO.EMS.LdapLookupContext.Settings
get

Return a copy of the current settings.


Copyright © 1997-2024 Cloud Software Group, Inc. All Rights Reserved.