public class JndiWorkSource extends AbstractWorkSource<JndiWork>
WorkSource
to execute Method
instances on a JNDI Object.AbstractWorkSource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FACADE_CLASS
Name of property containing the fully qualified class of the facade.
|
static String |
PROPERTY_JNDI_NAME
Name of property containing the JNDI name of the Object that is to be the
functionality of the
Work . |
static String |
PROPERTY_WORK_TYPE
Name of property containing the fully qualified type of the expected JNDI
Object.
|
Constructor and Description |
---|
JndiWorkSource() |
Modifier and Type | Method and Description |
---|---|
protected void |
loadSpecification(AbstractWorkSource.SpecificationContext context)
Loads the
WorkSourceSpecification . |
void |
sourceWork(WorkTypeBuilder<JndiWork> workTypeBuilder,
WorkSourceContext context)
Sources the
WorkType by populating it via the input
WorkTypeBuilder . |
getSpecification
public static final String PROPERTY_JNDI_NAME
Work
.public static final String PROPERTY_WORK_TYPE
public static final String PROPERTY_FACADE_CLASS
Name of property containing the fully qualified class of the facade.
To simplify using JNDI objects as Work
, a facade can be
optionally used to simplify the JNDI object methods for configuring into
OfficeFloor
.
Only Method
instances of the facade that have a parameter as per
PROPERTY_WORK_TYPE
are included. The JNDI Object will however
not appear as a TaskObjectType
, as it will be provided from the
Work
.
Should the facade have a Method
of the same name as a
Method
of the JNDI Object, the facade method will overwrite the
JNDI Object Method
.
The facade allows for example to:
protected void loadSpecification(AbstractWorkSource.SpecificationContext context)
AbstractWorkSource
WorkSourceSpecification
.loadSpecification
in class AbstractWorkSource<JndiWork>
context
- AbstractWorkSource.SpecificationContext
.public void sourceWork(WorkTypeBuilder<JndiWork> workTypeBuilder, WorkSourceContext context) throws Exception
WorkSource
WorkType
by populating it via the input
WorkTypeBuilder
.workTypeBuilder
- WorkTypeBuilder
to be populated with the
type definition
of the Work
.context
- WorkSourceContext
to source details to populate the
WorkTypeBuilder
.Exception
- If fails to populate the WorkTypeBuilder
.Copyright © 2005–2016. All rights reserved.