ADAPTED - The type of object being adaptedIN - The input type of the object being adaptedOUT - The output type of the object being adaptedpublic abstract class ContextAdaptor<ADAPTED,IN,OUT> extends Object
Function) to work around around a single element of a Context
and output to a potentially different key of that Context.
This base class just holds the parts required for the adaption (the object
being adapted, and the ContextExtractor and ContextInsertor),
but doesn't actually provide any functionality.
| Modifier and Type | Field and Description |
|---|---|
protected ContextExtractor<IN> |
extract |
protected ADAPTED |
inner |
protected ContextInsertor<OUT> |
insert |
| Constructor and Description |
|---|
ContextAdaptor(ADAPTED inner,
ContextExtractor<IN> extract,
ContextInsertor<OUT> insert)
Construct with the given options.
|
ContextAdaptor(ADAPTED inner,
String keyin,
String keyout)
Construct with the given object to adapt.
|
protected ContextExtractor<IN> extract
protected ContextInsertor<OUT> insert
public ContextAdaptor(ADAPTED inner, ContextExtractor<IN> extract, ContextInsertor<OUT> insert)
inner - the object being adaptedextract - the extractorinsert - the insertorpublic ContextAdaptor(ADAPTED inner, String keyin, String keyout)
inner - the object being adaptedkeyin - the key to extract from the context to produce the input for
the objectkeyout - the key to insert with the the output for the object