Package com.tibco.tibjms.naming
Class TibjmsContext
- java.lang.Object
-
- com.tibco.tibjms.naming.TibjmsContext
-
- All Implemented Interfaces:
javax.naming.Context
,javax.naming.Referenceable
public class TibjmsContext extends java.lang.Object implements javax.naming.Context, javax.naming.Referenceable
Implements the Context interface for lookups of information stored in the JNDI supported by TIBCO Enterprise Message Service.
TIBCO Enterprise Message Service implements proprietary JNDI which can be used by EMS clients to use JNDI lookup calls in order to load ConnectionFactories and Destinations. Notice that this class supports only lookup() methods and does not support bind(), unbind(), list() and other methods used to store objects into JNDI store or perform complex lookup operations.
Administered objects can be placed into the server JNDI configuration using the TIBCO Enterprise Message Service Administration Tool or from a Java program using TIBCO Enterprise Message Service Administration API.
This class allows to use secure TLS connection to the EMS server while performing JNDI lookups. To set up TLS connection to the JNDI backend supported by the server, the application should set appropriate TLS properties into the environment used to create this Context. Description of TLS properties is provided with this class but more detailed description of possible values and other information is provided with the com.tibco.tibjms.TibjmsSSL class.
This class also allows to perform fault-tolerant connection to JNDI backend. This means that EMS application may specify several server URLs in the PROVIDER_URL property.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_URL_LIST
Constant that holds the name of the environment property for specifying multiple server URL's to provide fault tolerance on JNDI lookups.static java.lang.String
SECURITY_PROTOCOL
Constant that holds the name of the environment property for specifying the security protocol to use in Tibjms JNDI lookups.static java.lang.String
SSL_AUTH_ONLY
Constant that holds the name of TLS property specifying if client should use TLS for authentication only.static java.lang.String
SSL_CIPHER_SUITES
Constant that holds the name of TLS property specifying the set of cipher suites to be used by the TLS connection in Tibjms JNDI lookups.static java.lang.String
SSL_DEBUG_TRACE
Constant that holds the name of TLS property specifying if client debug trace is required in Tibjms JNDI lookups.static java.lang.String
SSL_ENABLE_VERIFY_HOST
Constant that holds the name of TLS property specifying if client should verify the server certificate in Tibjms JNDI lookups.static java.lang.String
SSL_ENABLE_VERIFY_HOST_NAME
Constant that holds the name of TLS property specifying if client should verify the common name in the server certificate in Tibjms JNDI lookups.static java.lang.String
SSL_EXPECTED_HOST_NAME
Constant that holds the name of TLS property specifying the common name in the server certificate in Tibjms JNDI lookups.static java.lang.String
SSL_HOST_NAME_VERIFIER
Constant that holds the name of TLS property specifying the custom host name verifier in Tibjms JNDI lookups.static java.lang.String
SSL_IDENTITY
Constant that holds the name of TLS property specifying the client-side identity in Tibjms JNDI lookups.static java.lang.String
SSL_IDENTITY_ENCODING
Constant that holds the name of TLS property specifying the encoding of the data presented by IDENTITY property in Tibjms JNDI lookups.static java.lang.String
SSL_ISSUER_CERTIFICATES
Constant that holds the name of TLS property specifying the additional issuer certificates for the client certificate in Tibjms JNDI lookups.static java.lang.String
SSL_PASSWORD
Constant that holds the name of TLS property specifying the password for the private key or the identity store in Tibjms JNDI lookups.static java.lang.String
SSL_PRIVATE_KEY
Constant that holds the name of TLS property specifying the private key for the client certificate in Tibjms JNDI lookups.static java.lang.String
SSL_PRIVATE_KEY_ENCODING
Constant that holds the name of TLS property specifying the encoding of the data presented by PRIVATE_KEY property in Tibjms JNDI lookups.static java.lang.String
SSL_TRACE
Constant that holds the name of TLS property specifying if client trace is required in Tibjms JNDI lookups.static java.lang.String
SSL_TRUSTED_CERTIFICATES
Constant that holds the name of TLS property specifying the set of trusted certificates in Tibjms JNDI lookups.static java.lang.String
SSL_VENDOR
Constant that holds the name of TLS property specifying the TLS vendor to be used in Tibjms JNDI lookups.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
addToEnvironment(java.lang.String propName, java.lang.Object propValue)
void
bind(java.lang.String name, java.lang.Object value)
void
bind(javax.naming.Name name, java.lang.Object value)
void
close()
java.lang.String
composeName(java.lang.String name, java.lang.String prefix)
javax.naming.Name
composeName(javax.naming.Name name, javax.naming.Name prefix)
javax.naming.Context
createSubcontext(java.lang.String name)
javax.naming.Context
createSubcontext(javax.naming.Name name)
void
destroySubcontext(java.lang.String name)
void
destroySubcontext(javax.naming.Name name)
java.util.Hashtable
getEnvironment()
java.lang.String
getNameInNamespace()
javax.naming.NameParser
getNameParser(java.lang.String name)
javax.naming.NameParser
getNameParser(javax.naming.Name name)
javax.naming.Reference
getReference()
javax.naming.NamingEnumeration
list(java.lang.String name)
javax.naming.NamingEnumeration
list(javax.naming.Name name)
javax.naming.NamingEnumeration
listBindings(java.lang.String name)
javax.naming.NamingEnumeration
listBindings(javax.naming.Name name)
java.lang.Object
lookup(java.lang.String nameString)
java.lang.Object
lookup(javax.naming.Name name)
java.lang.Object
lookupLink(java.lang.String name)
java.lang.Object
lookupLink(javax.naming.Name name)
void
rebind(java.lang.String name, java.lang.Object value)
void
rebind(javax.naming.Name name, java.lang.Object value)
java.lang.Object
removeFromEnvironment(java.lang.String propName)
void
rename(java.lang.String oldName, java.lang.String newName)
void
rename(javax.naming.Name oldName, javax.naming.Name newName)
void
unbind(java.lang.String name)
void
unbind(javax.naming.Name name)
-
-
-
Field Detail
-
PROPERTY_URL_LIST
public static final java.lang.String PROPERTY_URL_LIST
Constant that holds the name of the environment property for specifying multiple server URL's to provide fault tolerance on JNDI lookups. The value can be a Vector or a String of comma separated URL's.
This name is defined as "com.tibco.tibjms.naming.url.list".- See Also:
- Constant Field Values
-
SECURITY_PROTOCOL
public static final java.lang.String 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 "com.tibco.tibjms.naming.security_protocol".- See Also:
- Constant Field Values
-
SSL_VENDOR
public static final java.lang.String SSL_VENDOR
Constant that holds the name of TLS property specifying the TLS vendor to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_vendor".- See Also:
TibjmsSSL.VENDOR
, Constant Field Values
-
SSL_TRACE
public static final java.lang.String 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 "com.tibco.tibjms.naming.ssl_trace".- See Also:
TibjmsSSL.TRACE
, Constant Field Values
-
SSL_DEBUG_TRACE
public static final java.lang.String SSL_DEBUG_TRACE
Constant that holds the name of TLS property specifying if client debug trace is required in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_debug_trace".- See Also:
TibjmsSSL.DEBUG_TRACE
, Constant Field Values
-
SSL_ENABLE_VERIFY_HOST
public static final java.lang.String SSL_ENABLE_VERIFY_HOST
Constant that holds the name of TLS property specifying if client should verify the server certificate in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_enable_verify_host".
-
SSL_ENABLE_VERIFY_HOST_NAME
public static final java.lang.String SSL_ENABLE_VERIFY_HOST_NAME
Constant that holds the name of TLS property specifying if client should verify the common name in the server certificate in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_enable_verify_hostname".
-
SSL_EXPECTED_HOST_NAME
public static final java.lang.String SSL_EXPECTED_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 "com.tibco.tibjms.naming.ssl_expected_hostname".
-
SSL_AUTH_ONLY
public static final java.lang.String 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 "com.tibco.tibjms.naming.ssl_auth_only".- See Also:
- Constant Field Values
-
SSL_TRUSTED_CERTIFICATES
public static final java.lang.String SSL_TRUSTED_CERTIFICATES
Constant that holds the name of TLS property specifying the set of trusted certificates in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_trusted_certs".
-
SSL_HOST_NAME_VERIFIER
public static final java.lang.String SSL_HOST_NAME_VERIFIER
Constant that holds the name of TLS property specifying the custom host name verifier in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_hostname_verifier".
-
SSL_IDENTITY
public static final java.lang.String SSL_IDENTITY
Constant that holds the name of TLS property specifying the client-side identity in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_identity".- See Also:
TibjmsSSL.IDENTITY
, Constant Field Values
-
SSL_IDENTITY_ENCODING
public static final java.lang.String SSL_IDENTITY_ENCODING
Constant that holds the name of TLS property specifying the encoding of the data presented by IDENTITY property in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_identity_encoding".- See Also:
TibjmsSSL.IDENTITY_ENCODING
, Constant Field Values
-
SSL_ISSUER_CERTIFICATES
public static final java.lang.String SSL_ISSUER_CERTIFICATES
Constant that holds the name of TLS property specifying the additional issuer certificates for the client certificate in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_issuer_certs".
-
SSL_PRIVATE_KEY
public static final java.lang.String SSL_PRIVATE_KEY
Constant that holds the name of TLS property specifying the private key for the client certificate in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_private_key".- See Also:
TibjmsSSL.PRIVATE_KEY
, Constant Field Values
-
SSL_PRIVATE_KEY_ENCODING
public static final java.lang.String SSL_PRIVATE_KEY_ENCODING
Constant that holds the name of TLS property specifying the encoding of the data presented by PRIVATE_KEY property in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_private_key_encoding".
-
SSL_PASSWORD
public static final java.lang.String SSL_PASSWORD
Constant that holds the name of TLS property specifying the password for the private key or the identity store in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_password".- See Also:
TibjmsSSL.PASSWORD
, Constant Field Values
-
SSL_CIPHER_SUITES
public static final java.lang.String SSL_CIPHER_SUITES
Constant that holds the name of TLS property specifying the set of cipher suites to be used by the TLS connection in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.ssl_cipher_suites".- See Also:
TibjmsSSL.CIPHER_SUITES
, Constant Field Values
-
-
Method Detail
-
getReference
public javax.naming.Reference getReference() throws javax.naming.NamingException
- Specified by:
getReference
in interfacejavax.naming.Referenceable
- Throws:
javax.naming.NamingException
-
addToEnvironment
public java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propValue) throws javax.naming.NamingException
- Specified by:
addToEnvironment
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
getEnvironment
public java.util.Hashtable getEnvironment() throws javax.naming.NamingException
- Specified by:
getEnvironment
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
removeFromEnvironment
public java.lang.Object removeFromEnvironment(java.lang.String propName) throws javax.naming.NamingException
- Specified by:
removeFromEnvironment
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
composeName
public javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix) throws javax.naming.NamingException
- Specified by:
composeName
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
composeName
public java.lang.String composeName(java.lang.String name, java.lang.String prefix) throws javax.naming.NamingException
- Specified by:
composeName
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
getNameInNamespace
public java.lang.String getNameInNamespace() throws javax.naming.NamingException
- Specified by:
getNameInNamespace
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
getNameParser
public javax.naming.NameParser getNameParser(java.lang.String name) throws javax.naming.NamingException
- Specified by:
getNameParser
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
getNameParser
public javax.naming.NameParser getNameParser(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
getNameParser
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
list
public javax.naming.NamingEnumeration list(java.lang.String name) throws javax.naming.NamingException
- Specified by:
list
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
lookup
public java.lang.Object lookup(java.lang.String nameString) throws javax.naming.NamingException
- Specified by:
lookup
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
lookup
public java.lang.Object lookup(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
lookup
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
lookupLink
public java.lang.Object lookupLink(java.lang.String name) throws javax.naming.NamingException
- Specified by:
lookupLink
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
lookupLink
public java.lang.Object lookupLink(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
lookupLink
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
close
public void close() throws javax.naming.NamingException
- Specified by:
close
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
list
public javax.naming.NamingEnumeration list(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
list
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
listBindings
public javax.naming.NamingEnumeration listBindings(java.lang.String name) throws javax.naming.NamingException
- Specified by:
listBindings
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
listBindings
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
listBindings
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
createSubcontext
public javax.naming.Context createSubcontext(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
createSubcontext
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
createSubcontext
public javax.naming.Context createSubcontext(java.lang.String name) throws javax.naming.NamingException
- Specified by:
createSubcontext
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
destroySubcontext
public void destroySubcontext(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
destroySubcontext
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
destroySubcontext
public void destroySubcontext(java.lang.String name) throws javax.naming.NamingException
- Specified by:
destroySubcontext
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
bind
public void bind(java.lang.String name, java.lang.Object value) throws javax.naming.NamingException
- Specified by:
bind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
bind
public void bind(javax.naming.Name name, java.lang.Object value) throws javax.naming.NamingException
- Specified by:
bind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
rebind
public void rebind(java.lang.String name, java.lang.Object value) throws javax.naming.NamingException
- Specified by:
rebind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
rebind
public void rebind(javax.naming.Name name, java.lang.Object value) throws javax.naming.NamingException
- Specified by:
rebind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
rename
public void rename(java.lang.String oldName, java.lang.String newName) throws javax.naming.NamingException
- Specified by:
rename
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
rename
public void rename(javax.naming.Name oldName, javax.naming.Name newName) throws javax.naming.NamingException
- Specified by:
rename
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
unbind
public void unbind(java.lang.String name) throws javax.naming.NamingException
- Specified by:
unbind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
unbind
public void unbind(javax.naming.Name name) throws javax.naming.NamingException
- Specified by:
unbind
in interfacejavax.naming.Context
- Throws:
javax.naming.NamingException
-
-