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.ReferenceableImplements 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.StringOAUTH2_ACCESS_TOKENConstant that holds the name of the property specifying the OAuth 2.0 access token to be used in Tibjms JNDI lookups.static java.lang.StringOAUTH2_CLIENT_IDConstant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 client ID to be used in Tibjms JNDI lookups.static java.lang.StringOAUTH2_CLIENT_SECRETConstant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 client secret to be used in Tibjms JNDI lookups.static java.lang.StringOAUTH2_DISABLE_VERIFY_HOSTNAMEConstant that holds the name of the OAuth 2.0 property specifying whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate during Tibjms JNDI lookups.static java.lang.StringOAUTH2_EXPECTED_HOSTNAMEConstant that holds the name of the OAuth 2.0 property specifying the expected hostname in the secure OAuth 2.0 authorization server host's certificate during Tibjms JNDI lookups.static java.lang.StringOAUTH2_SERVER_TRUST_FILEConstant that holds the name of the OAuth 2.0 property specifying the path to a PEM-encoded trust file or byte array for verifying the identity of the secure OAuth 2.0 authorization server to be used in Tibjms JNDI lookups.static java.lang.StringOAUTH2_SERVER_URLConstant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 authorization server URL to be used in Tibjms JNDI lookups.static java.lang.StringOAUTH2_TOKEN_FETCH_CALLBACK_OBJECTConstant that holds the name of the OAuth 2.0 property specifying theTibjmsOAuth2TokenFetchCallbackobject to be invoked to fetch the OAuth 2.0 access token to be used in Tibjms JNDI lookups.static java.lang.StringPROPERTY_URL_LISTConstant that holds the name of the environment property for specifying multiple server URL's to provide fault tolerance on JNDI lookups.static java.lang.StringSECURITY_PROTOCOLConstant that holds the name of the environment property for specifying the security protocol to use in Tibjms JNDI lookups.static java.lang.StringSSL_AUTH_ONLYConstant that holds the name of TLS property specifying if client should use TLS for authentication only.static java.lang.StringSSL_CIPHER_SUITESConstant 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.StringSSL_DEBUG_TRACEConstant that holds the name of TLS property specifying if client debug trace is required in Tibjms JNDI lookups.static java.lang.StringSSL_ENABLE_VERIFY_HOSTConstant that holds the name of TLS property specifying if client should verify the server certificate in Tibjms JNDI lookups.static java.lang.StringSSL_ENABLE_VERIFY_HOST_NAMEConstant 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.StringSSL_EXPECTED_HOST_NAMEConstant that holds the name of TLS property specifying the common name in the server certificate in Tibjms JNDI lookups.static java.lang.StringSSL_HOST_NAME_VERIFIERConstant that holds the name of TLS property specifying the custom host name verifier in Tibjms JNDI lookups.static java.lang.StringSSL_IDENTITYConstant that holds the name of TLS property specifying the client-side identity in Tibjms JNDI lookups.static java.lang.StringSSL_IDENTITY_ENCODINGConstant that holds the name of TLS property specifying the encoding of the data presented by IDENTITY property in Tibjms JNDI lookups.static java.lang.StringSSL_ISSUER_CERTIFICATESConstant that holds the name of TLS property specifying the additional issuer certificates for the client certificate in Tibjms JNDI lookups.static java.lang.StringSSL_PASSWORDConstant 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.StringSSL_PRIVATE_KEYConstant that holds the name of TLS property specifying the private key for the client certificate in Tibjms JNDI lookups.static java.lang.StringSSL_PRIVATE_KEY_ENCODINGConstant 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.StringSSL_TRACEConstant that holds the name of TLS property specifying if client trace is required in Tibjms JNDI lookups.static java.lang.StringSSL_TRUSTED_CERTIFICATESConstant that holds the name of TLS property specifying the set of trusted certificates in Tibjms JNDI lookups.static java.lang.StringSSL_VENDORConstant 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.ObjectaddToEnvironment(java.lang.String propName, java.lang.Object propValue)voidbind(java.lang.String name, java.lang.Object value)voidbind(javax.naming.Name name, java.lang.Object value)voidclose()java.lang.StringcomposeName(java.lang.String name, java.lang.String prefix)javax.naming.NamecomposeName(javax.naming.Name name, javax.naming.Name prefix)javax.naming.ContextcreateSubcontext(java.lang.String name)javax.naming.ContextcreateSubcontext(javax.naming.Name name)voiddestroySubcontext(java.lang.String name)voiddestroySubcontext(javax.naming.Name name)java.util.HashtablegetEnvironment()java.lang.StringgetNameInNamespace()javax.naming.NameParsergetNameParser(java.lang.String name)javax.naming.NameParsergetNameParser(javax.naming.Name name)javax.naming.ReferencegetReference()javax.naming.NamingEnumerationlist(java.lang.String name)javax.naming.NamingEnumerationlist(javax.naming.Name name)javax.naming.NamingEnumerationlistBindings(java.lang.String name)javax.naming.NamingEnumerationlistBindings(javax.naming.Name name)java.lang.Objectlookup(java.lang.String nameString)java.lang.Objectlookup(javax.naming.Name name)java.lang.ObjectlookupLink(java.lang.String name)java.lang.ObjectlookupLink(javax.naming.Name name)voidrebind(java.lang.String name, java.lang.Object value)voidrebind(javax.naming.Name name, java.lang.Object value)java.lang.ObjectremoveFromEnvironment(java.lang.String propName)voidrename(java.lang.String oldName, java.lang.String newName)voidrename(javax.naming.Name oldName, javax.naming.Name newName)voidunbind(java.lang.String name)voidunbind(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
-
OAUTH2_ACCESS_TOKEN
public static final java.lang.String OAUTH2_ACCESS_TOKEN
Constant that holds the name of the property specifying the OAuth 2.0 access token to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.access.token".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_ACCESS_TOKEN, Constant Field Values
-
OAUTH2_SERVER_URL
public static final java.lang.String OAUTH2_SERVER_URL
Constant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 authorization server URL to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.server.url".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_URL, Constant Field Values
-
OAUTH2_CLIENT_ID
public static final java.lang.String OAUTH2_CLIENT_ID
Constant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 client ID to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.client.id".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_CLIENT_ID, Constant Field Values
-
OAUTH2_CLIENT_SECRET
public static final java.lang.String OAUTH2_CLIENT_SECRET
Constant that holds the name of the OAuth 2.0 property specifying the OAuth 2.0 client secret to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.client.secret".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_CLIENT_SECRET, Constant Field Values
-
OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT
public static final java.lang.String OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT
Constant that holds the name of the OAuth 2.0 property specifying theTibjmsOAuth2TokenFetchCallbackobject to be invoked to fetch the OAuth 2.0 access token to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.token.fetch.callback.object".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_TOKEN_FETCH_CALLBACK_OBJECT,TibjmsOAuth2TokenFetchCallback, Constant Field Values
-
OAUTH2_SERVER_TRUST_FILE
public static final java.lang.String OAUTH2_SERVER_TRUST_FILE
Constant that holds the name of the OAuth 2.0 property specifying the path to a PEM-encoded trust file or byte array for verifying the identity of the secure OAuth 2.0 authorization server to be used in Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.server.trust.file".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_SERVER_TRUST_FILE, Constant Field Values
-
OAUTH2_DISABLE_VERIFY_HOSTNAME
public static final java.lang.String OAUTH2_DISABLE_VERIFY_HOSTNAME
Constant that holds the name of the OAuth 2.0 property specifying whether to disable client verification of the hostname in the secure OAuth 2.0 authorization server host's certificate during Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.disable.verify.hostname".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_DISABLE_VERIFY_HOSTNAME, Constant Field Values
-
OAUTH2_EXPECTED_HOSTNAME
public static final java.lang.String OAUTH2_EXPECTED_HOSTNAME
Constant that holds the name of the OAuth 2.0 property specifying the expected hostname in the secure OAuth 2.0 authorization server host's certificate during Tibjms JNDI lookups.
This name is defined as "com.tibco.tibjms.naming.oauth2.expected.hostname".- Since:
- EMS 10.4.0
- See Also:
Tibjms.PROP_OAUTH2_EXPECTED_HOSTNAME, Constant Field Values
-
-
Method Detail
-
getReference
public javax.naming.Reference getReference() throws javax.naming.NamingException- Specified by:
getReferencein 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:
addToEnvironmentin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
getEnvironment
public java.util.Hashtable getEnvironment() throws javax.naming.NamingException- Specified by:
getEnvironmentin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
removeFromEnvironment
public java.lang.Object removeFromEnvironment(java.lang.String propName) throws javax.naming.NamingException- Specified by:
removeFromEnvironmentin 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:
composeNamein 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:
composeNamein interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
getNameInNamespace
public java.lang.String getNameInNamespace() throws javax.naming.NamingException- Specified by:
getNameInNamespacein interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
getNameParser
public javax.naming.NameParser getNameParser(java.lang.String name) throws javax.naming.NamingException- Specified by:
getNameParserin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
getNameParser
public javax.naming.NameParser getNameParser(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
getNameParserin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
list
public javax.naming.NamingEnumeration list(java.lang.String name) throws javax.naming.NamingException- Specified by:
listin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
lookup
public java.lang.Object lookup(java.lang.String nameString) throws javax.naming.NamingException- Specified by:
lookupin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
lookup
public java.lang.Object lookup(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
lookupin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
lookupLink
public java.lang.Object lookupLink(java.lang.String name) throws javax.naming.NamingException- Specified by:
lookupLinkin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
lookupLink
public java.lang.Object lookupLink(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
lookupLinkin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
close
public void close() throws javax.naming.NamingException- Specified by:
closein interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
list
public javax.naming.NamingEnumeration list(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
listin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
listBindings
public javax.naming.NamingEnumeration listBindings(java.lang.String name) throws javax.naming.NamingException- Specified by:
listBindingsin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
listBindings
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
listBindingsin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
createSubcontext
public javax.naming.Context createSubcontext(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
createSubcontextin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
createSubcontext
public javax.naming.Context createSubcontext(java.lang.String name) throws javax.naming.NamingException- Specified by:
createSubcontextin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
destroySubcontext
public void destroySubcontext(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
destroySubcontextin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
destroySubcontext
public void destroySubcontext(java.lang.String name) throws javax.naming.NamingException- Specified by:
destroySubcontextin 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:
bindin 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:
bindin 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:
rebindin 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:
rebindin 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:
renamein 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:
renamein interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
unbind
public void unbind(java.lang.String name) throws javax.naming.NamingException- Specified by:
unbindin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
unbind
public void unbind(javax.naming.Name name) throws javax.naming.NamingException- Specified by:
unbindin interfacejavax.naming.Context- Throws:
javax.naming.NamingException
-
-