|
If not dev, correct this wrong version label in perforce3227:3227\buildenvBE.Japro<CODELINE>src_macrospackjavadoc.properties | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.aii.mapping.api.AbstractTransformation
public abstract class AbstractTransformation
Each XI Java mapping program must extends this abstract class. It replace the
depricated interface AbstractTransformation.
The implementing class needs a default constructor. For each
message a new instance is created with the default constructor.
Afterwards setHelper(AbstractHelper) is called before
transform(TransformationInput, TransformationOutput) is called.
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import java.util.HashMap;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
public class JavaMapping extends AbstractTransformation {
public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException {
getTrace().addInfo("...");
// ...
String receiverName = (String) in.getInputHeader().getReceiverInterface();
// ...
}
}
It is possible that different instances of the implementing class are
executed in parallel in different Threads. Take care about
this when using static fields or static methods. Java mapping programs are
not permitted to be stateful. It is not permitted to perform actions such as
writing data to a database table during a Java mapping. The Integration
Server cannot track such side effects. Therefore, if an attempt is made to
resend a message that has not been received by the receiver, the data may
inadvertently be written to the database twice in a Java mapping.
Note also that you cannot call java.lang.System.exit() or
java.lang.System.setProperties() within a Java mapping and
that you cannot use a ClassLoader in the classes of an
imported archive.
For reading files from an imported Archive
getClass().getResourceAsStream(String
name) can be used.
| Constructor Summary | |
|---|---|
protected |
AbstractTransformation()
|
| Method Summary | |
|---|---|
AbstractHelper |
getHelper()
Return an AbstractHelper for this Java mapping program. |
AbstractTrace |
getTrace()
the the method returns null before the mthod setHelper is called. during the mapping runtime this is executed: calling constructor(); calling setHelper(...); calling transform( |
void |
setHelper(AbstractHelper helper)
ONLY FOR XI INTERNAL USE! |
abstract void |
transform(TransformationInput in,
TransformationOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractTransformation()
| Method Detail |
|---|
public abstract void transform(TransformationInput in,
TransformationOutput out)
throws StreamTransformationException
in - the transformation inputout - the tarnsformation output
StreamTransformationExceptionpublic final AbstractTrace getTrace()
public final AbstractHelper getHelper()
AbstractHelper for this Java mapping program.
public final void setHelper(AbstractHelper helper)
transform(TransformationInput, TransformationOutput) is called to
set the AbstractHelper object.
helper - the {@link AbstractHelper) for this Java mapping program.
|
If not dev, correct this wrong version label in perforce3227:3227\buildenvBE.Japro<CODELINE>src_macrospackjavadoc.properties | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||