@Service @PerLookup public class WorkContextHandlerImpl extends Object implements WorkContextHandler
| Constructor and Description |
|---|
WorkContextHandlerImpl() |
WorkContextHandlerImpl(ConnectorRuntime runtime,
ClassLoader cl) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canContainerHandleContext(String contextClassName)
checks whether the container can handle the contextClass in question.
|
static void |
debug(String message) |
static javax.resource.spi.work.ExecutionContext |
getExecutionContext(javax.resource.spi.work.Work work) |
void |
init(String raName,
ClassLoader cl)
initialize the work-context-handler
|
boolean |
isContextSupported(boolean strict,
String workContextClassName)
indicates whether the provided workContextClass is supported by the container
|
boolean |
isContextSupported(Class contextClass) |
void |
setupContext(javax.resource.spi.work.ExecutionContext ec,
WorkCoordinator wc,
OneWork work)
setup the work context or execution context for the work
|
void |
validateWork(javax.resource.spi.work.Work work,
javax.resource.spi.work.ExecutionContext ec)
validate the submitted work
|
public WorkContextHandlerImpl()
public WorkContextHandlerImpl(ConnectorRuntime runtime, ClassLoader cl)
public void init(String raName, ClassLoader cl)
init in interface WorkContextHandlerraName - resource-adapter namecl - class-loader of the resource-adapterpublic boolean isContextSupported(boolean strict,
String workContextClassName)
isContextSupported in interface WorkContextHandlerstrict - indicates whether the type-check need to be strict or not i.e.,
exact type or its super-class typeworkContextClassName - work context class namepublic boolean canContainerHandleContext(String contextClassName)
contextClassName - work context class namepublic void validateWork(javax.resource.spi.work.Work work,
javax.resource.spi.work.ExecutionContext ec)
throws javax.resource.spi.work.WorkCompletedException,
javax.resource.spi.work.WorkRejectedException
work - work instance to be validatedec - ExecutionContextjavax.resource.spi.work.WorkCompletedException - when a submitted context is not supportedjavax.resource.spi.work.WorkRejectedException - when validation failspublic void setupContext(javax.resource.spi.work.ExecutionContext ec,
WorkCoordinator wc,
OneWork work)
throws javax.resource.spi.work.WorkCompletedException
ec - ExecutionContextwc - Work coordinatorjavax.resource.spi.work.WorkCompletedExceptionpublic static void debug(String message)
public static javax.resource.spi.work.ExecutionContext getExecutionContext(javax.resource.spi.work.Work work)
public boolean isContextSupported(Class contextClass)
Copyright © 2019. All rights reserved.