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 | Public Attributes | Properties | List of all members
TIBCO.EMS.LookupContext Class Reference

Search for and perform queries on administered objects in the EMS server More...

Inheritance diagram for TIBCO.EMS.LookupContext:

## Public Member Functions
| LookupContext ()
| Create a new LookupContext object More...
| LookupContext (Hashtable prop)
| Create a new LookupContext object with specific properties More...
virtual void | AddSettings (Hashtable prop)
| Add or change the current LookupContext property settings contained in a hash table More...
virtual object | AddSettings (string propName, object propValue)
| Add or change a property setting in the current LookupContext More...
virtual Object | RemoveSettings (string propName)
| Remove a property setting from this LookupContext More...
virtual object | Lookup (string name)
| Lookup an object in the naming server More...

## Public Attributes
const string | PROVIDER_URL = "TIBCO.EMS.provider.url"
| URL of the naming server (EMS server). More...
const string | SECURITY_PRINCIPAL = "TIBCO.EMS.security.principal"
| User name of the client program. More...
const string | SECURITY_CREDENTIALS = "TIBCO.EMS.security.credentials"
| User password of the client program. More...
const String | SECURITY_PROTOCOL = "TIBCO.EMS.naming.security_protocol"
| Constant that holds the name of the environment property for specifying the security protocol to use in Tibjms JNDI lookups. The only value currently recognized is the String "ssl", therefore, this property acts as a flag to turn ssl encryption on or off in JNDI lookups. This name is defined as "TIBCO.EMS.naming.security_protocol". More...
const String | SSL_TRACE = "TIBCO.EMS.naming.ssl_trace"
| Constant that holds the name of SSL property specifying if client trace is required in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_trace". TIBCO.EMS.EMSSSL.TRACE More...
const String | SSL_TARGET_HOST_NAME = "TIBCO.EMS.naming.ssl_target_host_name"
| Constant that holds the name of SSL property specifying the common name in the server certificate in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_target_host_name". TIBCO.EMS.EMSSSL.TARGET_HOST_NAME More...
const String | SSL_AUTH_ONLY = "TIBCO.EMS.naming.ssl_auth_only"
| Constant that holds the name of SSL property specifying if client should use SSL for authentication only. This name is defined as "TIBCO.EMS.naming.ssl_auth_only". More...
const String | SSL_HOST_NAME_VERIFIER = "TIBCO.EMS.naming.ssl_hostname_verifier"
| Constant that holds the name of SSL property specifying the custom host name verifier in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_hostname_verifier". TIBCO.EMS.EMSSSL.HOST_NAME_VERIFIER More...
const String | SSL_STORE_TYPE = "TIBCO.EMS.naming.ssl_store_type"
| Constant that holds the name of SSL property specifying SSL Store type More...
const String | SSL_STORE_INFO = "TIBCO.EMS.naming.ssl_store_info"
| Constant that holds the name of SSL property specifying SSL Store Info More...
const string | URL_LIST = "TIBCO.EMS.url.list"
| ArrayList of URLs of naming servers (EMS servers). More...
const string | URL_SEPARATOR = ","
| Syntactic separator between URLs in the PROVIDER_URL. More...

## Properties
Hashtable | Setttings`[get]`
| Gets a copy of the property settings. Deprecated More...
Hashtable | Settings`[get]`
| Gets a copy of the property settings More...

## Detailed Description

Search for and perform queries on administered objects in the EMS server

The LookupContext class provides an interface for users to search and perform queries against the naming/directory server built into EMS.

User can create an instance of the LookupContext and invoke the `Lookup(string name)` method which returns the queried object or throw a NamingException in case of failure. The information required to perform a search includes the url of the directory service provider (e.g. the Tibco Enterprise Message Service Server) and user name and password, if necessary.

The following is an example of its usage:

Hashtable env = new Hashtable();
env.Add(LookupContext.PROVIDER_URL, "tibjmsnaming://localhost:7222");
env.Add(LookupContext.SECURITY_PRINCIPAL", "myUserName");
env.Add(LookupContext.SECURITY_CREDENTIALS", "myPassword");
try {
LookupContext searcher = new LookupContext(env);
TIBCO.EMS.Queue queue = (TIBCO.EMS.Queue)searcher.Lookup("theQueueName");
...
} catch (NamingException) {
...
}

## Constructor & Destructor Documentation

TIBCO.EMS.LookupContext.LookupContext | ( |  | ) |
| inline

Create a new LookupContext object

This method creates a new lookup context without property settings.

Exceptions

  NamingException | If error occurred in constructing a Namesearcher object

TIBCO.EMS.LookupContext.LookupContext | ( | Hashtable | prop | ) |
| inline

Create a new LookupContext object with specific properties

This method creates a new lookup context with the given property settings. The properties that are being referred to here are lookup context properties required to connect naming server.

Parameters

  prop | The hashtable of property settings

Exceptions

  NamingException | If error occurred in constructing a Namesearcher object

## Member Function Documentation

virtual void TIBCO.EMS.LookupContext.AddSettings | ( | Hashtable | prop | ) |
| inline virtual

Add or change the current LookupContext property settings contained in a hash table

Parameters

  prop | The hashtable containing property settings to be added or changed.

virtual object TIBCO.EMS.LookupContext.AddSettings | ( | string | propName,
|  | object | propValue
| ) |  |
| inline virtual

Add or change a property setting in the current LookupContext

Parameters

  propName | The name of the property to add or change.
  propValue | The value of the property to add; or the new value, if changing.

Returns
  The original value of the property, if it was changed.

virtual object TIBCO.EMS.LookupContext.Lookup | ( | string | name | ) |
| inline virtual

Lookup an object in the naming server

This method provides the naming service to query an object by its name.

For example:

@verbatim
Hashtable env = new Hashtable();
env.Add(LookupContext.PROVIDER_URL, "tibjmsnaming://localhost:7222");
env.Add(LookupContext.SECURITY_PRINCIPAL", "myUserName");
env.Add(LookupContext.SECURITY_CREDENTIALS", "myPassword");
try {
LookupContext searcher = new LookupContext(env);
TIBCO.EMS.Queue queue = (TIBCO.EMS.Queue)searcher.Lookup("theQueueName");
...
} catch (NamingException) {
...
}
@endverbatim

Parameters

  name | The name of the object to look up from the naming server.

Returns
  The named object.

Exceptions

  AuthenticationException | If authentication to the naming server has failed.
  ServiceUnavailableException | If the naming service is unavailable.
  NamingException | If the named object is not found or the query to the naming service failed.

Reimplemented in TIBCO.EMS.UFO.LookupContext.

virtual Object TIBCO.EMS.LookupContext.RemoveSettings | ( | string | propName | ) |
| inline virtual

Remove a property setting from this LookupContext

Parameters

  propName | The name of the property to remove.

Returns
  The value of the property setting.

## Member Data Documentation

const string TIBCO.EMS.LookupContext.PROVIDER_URL = "TIBCO.EMS.provider.url"

URL of the naming server (EMS server).

const string TIBCO.EMS.LookupContext.SECURITY_CREDENTIALS = "TIBCO.EMS.security.credentials"

User password of the client program.

const string TIBCO.EMS.LookupContext.SECURITY_PRINCIPAL = "TIBCO.EMS.security.principal"

User name of the client program.

const String TIBCO.EMS.LookupContext.SECURITY_PROTOCOL = "TIBCO.EMS.naming.security_protocol"

Constant that holds the name of the environment property for specifying the security protocol to use in Tibjms JNDI lookups. The only value currently recognized is the String "ssl", therefore, this property acts as a flag to turn ssl encryption on or off in JNDI lookups. This name is defined as "TIBCO.EMS.naming.security_protocol".

Note: If ssl connection is needed to lookup administered objects then this property needs to be set.

const String TIBCO.EMS.LookupContext.SSL_AUTH_ONLY = "TIBCO.EMS.naming.ssl_auth_only"

Constant that holds the name of SSL property specifying if client should use SSL for authentication only. This name is defined as "TIBCO.EMS.naming.ssl_auth_only".

const String TIBCO.EMS.LookupContext.SSL_HOST_NAME_VERIFIER = "TIBCO.EMS.naming.ssl_hostname_verifier"

Constant that holds the name of SSL property specifying the custom host name verifier in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_hostname_verifier". TIBCO.EMS.EMSSSL.HOST_NAME_VERIFIER

const String TIBCO.EMS.LookupContext.SSL_STORE_INFO = "TIBCO.EMS.naming.ssl_store_info"

Constant that holds the name of SSL property specifying SSL Store Info

const String TIBCO.EMS.LookupContext.SSL_STORE_TYPE = "TIBCO.EMS.naming.ssl_store_type"

Constant that holds the name of SSL property specifying SSL Store type

const String TIBCO.EMS.LookupContext.SSL_TARGET_HOST_NAME = "TIBCO.EMS.naming.ssl_target_host_name"

Constant that holds the name of SSL property specifying the common name in the server certificate in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_target_host_name". TIBCO.EMS.EMSSSL.TARGET_HOST_NAME

const String TIBCO.EMS.LookupContext.SSL_TRACE = "TIBCO.EMS.naming.ssl_trace"

Constant that holds the name of SSL property specifying if client trace is required in Tibjms JNDI lookups. This name is defined as "TIBCO.EMS.naming.ssl_trace". TIBCO.EMS.EMSSSL.TRACE

const string TIBCO.EMS.LookupContext.URL_LIST = "TIBCO.EMS.url.list"

ArrayList of URLs of naming servers (EMS servers).

This property lets programs specify URLs as an ArrayList, rather than as a string (as with PROVIDER_URL).

const string TIBCO.EMS.LookupContext.URL_SEPARATOR = ","

Syntactic separator between URLs in the PROVIDER_URL.

## Property Documentation

Hashtable TIBCO.EMS.LookupContext.Settings
| get

Gets a copy of the property settings

A copy of the hashtable that contains all property settings

Hashtable TIBCO.EMS.LookupContext.Setttings
| get

Gets a copy of the property settings. Deprecated

A copy of the hashtable that contains all property settings

Deprecated:
  Use LookupContext.Settings instead.