TIBCO EMS .NET API 10.3
TIBCO EMS .NET API 10.3
TIBCO.EMS.UFO.LookupContext Class Reference

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

Inheritance diagram for TIBCO.EMS.UFO.LookupContext:
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...
 
override object Lookup (string name)
 Lookup an object in the naming server More...
 
- Public Member Functions inherited from TIBCO.EMS.LookupContext
 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...
 

Additional Inherited Members

- Public Attributes inherited from TIBCO.EMS.LookupContext
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 TLS 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 TLS 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 TLS 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 TLS property specifying if client should use TLS 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 TLS 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 TLS property specifying TLS Store type More...
 
const String SSL_STORE_INFO = "TIBCO.EMS.naming.ssl_store_info"
 Constant that holds the name of TLS property specifying TLS 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 inherited from TIBCO.EMS.LookupContext
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(TIBOC.EMS.LookupContext.PROVIDER_URL, "tibjmsnaming://localhost:7222");
env.Add(TIBOC.EMS.LookupContext.SECURITY_PRINCIPAL", "myUserName");
env.Add(TIBOC.EMS.LookupContext.SECURITY_CREDENTIALS", "myPassword");
try {
LookupContext searcher = new LookupContext(env);
TIBCO.EMS.UFO.Queue queue = (TIBCO.EMS.UFO.Queue)searcher.Lookup("theQueueName");
...
} catch (NamingException) {
...
}

Constructor & Destructor Documentation

TIBCO.EMS.UFO.LookupContext.LookupContext ( )
inline

Create a new LookupContext object

This method creates a new lookup context without property settings.

Exceptions
NamingExceptionIf error occurred in constructing a Namesearcher object
TIBCO.EMS.UFO.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
propThe hashtable of property settings
Exceptions
NamingExceptionIf error occurred in constructing a Namesearcher object

Member Function Documentation

override object TIBCO.EMS.UFO.LookupContext.Lookup ( string  name)
inlinevirtual

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(TIBCO.EMS.LookupContext.PROVIDER_URL, "tibjmsnaming://localhost:7222");
env.Add(TIBCO.EMS.LookupContext.SECURITY_PRINCIPAL", "myUserName");
env.Add(TIBCO.EMS.LookupContext.SECURITY_CREDENTIALS", "myPassword");
try {
TIBCO.EMS.UFO.Queue queue = (TIBCO.EMS.UFO.Queue)searcher.Lookup("theQueueName");
...
} catch (NamingException) {
...
}
@endverbatim
Parameters
nameThe name of the object to look up from the naming server.
Returns
The named object.
Exceptions
AuthenticationExceptionIf authentication to the naming server has failed.
ServiceUnavailableExceptionIf the naming service is unavailable.
NamingExceptionIf the named object is not found or the query to the naming service failed.

Reimplemented from TIBCO.EMS.LookupContext.


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