java.lang.Object
org.omnifaces.util.JNDIObjectLocator.JNDIObjectLocatorBuilder
- Enclosing class:
- JNDIObjectLocator
The builder of the
JNDIObjectLocator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapp()Specifies that the default namespace to be used in construction of portable JNDI names must bejava:appinstead ofjava:module.build()Builds theJNDIObjectLocator.Specifies to cache remote enterprise beans.environment(String key, String value) Adds an environment property.environment(Map<String, String> environment) Specifies the environment to be passed intoInitialContext.global()Specifies that the default namespace to be used in construction of portable JNDI names must bejava:globalinstead ofjava:module.initialHost(String initialHost) Adds initial host environment property.initialPort(int initialPort) Adds initial port environment property.Specifies the default namespace to be used in construction of portable JNDI names.Specifies to disable cache.
-
Constructor Details
-
JNDIObjectLocatorBuilder
public JNDIObjectLocatorBuilder()
-
-
Method Details
-
environment
Specifies the environment to be passed intoInitialContext. The default isnull.- Parameters:
environment- The environment.- Returns:
- This builder.
- Throws:
NullPointerException- When given environment is null.IllegalStateException- When environment is already set in this builder or when this builder is already build.
-
environment
Adds an environment property.- Parameters:
key- The key of the new environment property.value- The value of the new environment property.- Returns:
- This builder.
- Throws:
NullPointerException- When key or value is null.IllegalStateException- When environment property is already set in this builder or when this builder is already build.
-
initialHost
Adds initial host environment property.- Parameters:
initialHost- The initial host environment property.- Returns:
- This builder.
- Throws:
IllegalStateException- When initial host is already set in this builder or when this builder is already build.NullPointerException- When value is null.
-
initialPort
Adds initial port environment property.- Parameters:
initialPort- The initial port environment property.- Returns:
- This builder.
- Throws:
IllegalStateException- When initial port is already set in this builder or when this builder is already build.
-
namespace
Specifies the default namespace to be used in construction of portable JNDI names. The default isjava:module.- Parameters:
namespace- The namespace.- Returns:
- This builder.
- Throws:
IllegalStateException- When namespace is already set in this builder or when this builder is already build.NullPointerException- When given namespace is null.
-
global
Specifies that the default namespace to be used in construction of portable JNDI names must bejava:globalinstead ofjava:module.- Returns:
- This builder.
- Throws:
IllegalStateException- When namespace is already set in this builder.
-
app
Specifies that the default namespace to be used in construction of portable JNDI names must bejava:appinstead ofjava:module.- Returns:
- This builder.
- Throws:
IllegalStateException- When namespace is already set in this builder.
-
noCaching
Specifies to disable cache. The default isfalse.- Returns:
- This builder.
- Throws:
IllegalStateException- When noCaching is already set in this builder or when this builder is already build.
-
cacheRemote
Specifies to cache remote enterprise beans. The default isfalse.- Returns:
- This builder.
- Throws:
IllegalStateException- When cacheRemote is already set in this builder or when this builder is already build.
-
build
Builds theJNDIObjectLocator.- Returns:
- The
JNDIObjectLocator. - Throws:
IllegalStateException- When this builder is already build.
-