public class ContextClassLoaderJobOperatorContextSelector extends Object implements JobOperatorContextSelector
JobOperatorContext
for.
If a context os not found for the loader the default context will be
used.Constructor and Description |
---|
ContextClassLoaderJobOperatorContextSelector(JobOperatorContextSelector defaultSelector)
Creates a new selector.
|
Modifier and Type | Method and Description |
---|---|
JobOperatorContext |
getJobOperatorContext()
Returns the job operator context for the current environment.
|
void |
registerContext(ClassLoader classLoader,
JobOperatorContext context)
Registers a context with the class loader.
|
JobOperatorContext |
unregisterContext(ClassLoader classLoader)
Attempts to remove the context registered for the class loader.
|
boolean |
unregisterContext(ClassLoader classLoader,
JobOperatorContext context)
Attempts to remove the specific context registered for the class loader.
|
public ContextClassLoaderJobOperatorContextSelector(JobOperatorContextSelector defaultSelector)
defaultSelector
- the default selector, cannot be nullpublic JobOperatorContext getJobOperatorContext()
JobOperatorContextSelector
getJobOperatorContext
in interface JobOperatorContextSelector
public void registerContext(ClassLoader classLoader, JobOperatorContext context)
classLoader
- the class loader to register the context withcontext
- the context that should be used on the class loaderpublic JobOperatorContext unregisterContext(ClassLoader classLoader)
null
will be returned.classLoader
- the class loader to remove the context fornull
if the class loader did not have a registered contextpublic boolean unregisterContext(ClassLoader classLoader, JobOperatorContext context)
false
will be returned.classLoader
- the class loader to remove the context forcontext
- the context which should be removedtrue
if the context was removed, otherwise false
Copyright © 2019 JBoss by Red Hat. All rights reserved.