|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.scufl.AlternateProcessor
public class AlternateProcessor
Represents an alternate processor to be used in case of failures in the primary. Contains the Processor object to use as an alternate and two Map objects, these act as translations between the input and output names of the original and substitute processor.
For example, suppose the original processor has inputs as follows :
| Name | Description | Type |
| inseq | Input sequence | 'text/plain' |
| format | Desired format | 'text/plain' |
and the substitute has a similar set of inputs but with slightly different names :
| Name | Description | Type |
| seq | Input sequence | 'text/plain' |
| sformat | Desired format | 'text/plain' |
In this case the inputMapping object would contain the following :
| Key | Value |
| inseq | seq |
| format | sformat |
This allows the task implementation to connect the appropriate inputs to the alternate processor. A similar map would exist for the outputs, again with the original or primary name as the key and alternate name as the value.
| Constructor Summary | |
|---|---|
AlternateProcessor(Processor alternate)
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getInputMapping()
Get the input mappings, a Map object with keys being the original or primary input names and values being the corresponding names of inputs on the alternate processor this holder class contains. |
Processor |
getOriginalProcessor()
Return the processor for which this container holds the alternate implementation. |
java.util.Map<java.lang.String,java.lang.String> |
getOutputMapping()
Get the output mappings, a Map object with keys being the original or primary output names and values being the corresponding names of outputs on the alternate processor this holder class contains. |
java.lang.String |
getPortTranslation(java.lang.String alternatePort)
For a given port name in this alternate, fetch the original port name. |
Processor |
getProcessor()
Return the alternate processor object. |
void |
setOriginalProcessor(Processor p)
|
java.lang.String |
toString()
Use the toString method of the underlying processor |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AlternateProcessor(Processor alternate)
| Method Detail |
|---|
public Processor getProcessor()
public Processor getOriginalProcessor()
public void setOriginalProcessor(Processor p)
public java.util.Map<java.lang.String,java.lang.String> getInputMapping()
public java.util.Map<java.lang.String,java.lang.String> getOutputMapping()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getPortTranslation(java.lang.String alternatePort)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||