TIBCO EMS .NET API 8.5 TIBCO EMS .NET API 8.5

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Properties | List of all members
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

  prop | The hash table that contains the name-value pairs used to set the lookup context.

Exceptions

  ArgumentException | If 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

  propName | Set this single property. See LdapLookupConsts.LDAP_BASE_DN for property names.
  propValue | Set the single property to this value.

Exceptions

  ArgumentException | If 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 ssl connection factory object, because of certain differences in the .NET ssl implementation and java/c ssl implementation certain paramaters do not hold any relavance 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 ssl 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

  name | Lookup the object with this name.

Exceptions

  NullReferenceException | If the name is null.
  ConfigurationException | If any of the configuration parameters are missing.
  NamingException | Any 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

  propName | Remove this property. For property names, see LdapLookupConsts.

Exceptions

  ArgumentException | If the property name is null.

## Property Documentation

Hashtable TIBCO.EMS.LdapLookupContext.Settings
| get

Return a copy of the current settings.