cancel
Showing results for 
Search instead for 
Did you mean: 

Use of setParameter( ) in Java Mapping

Former Member
0 Kudos

Hello friends,

I am new to XI. Now i am doing Java Mapping. I could not understand the purpose of the method setParameter(Map param) in the interface StreamTransformation.

Can you tell me why it is needed and where it is used?

Thanks & Regards,

Senthil.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi senthil,

in the method setParameter() you declare an instance of Map class.

In runtime the Mapping runtime triggers this method passing the Runtime StreamTransformation parameters to the instance of Map, you can use this instance later on in your program to access runtime parameters such as MESSAGE_ID etc.

**Reward points if helpful.

--Sankar Choudhury

Former Member
0 Kudos

Hi Sankar,

Thanks a lot for your reply. I got some idea.

Do i need to implement(i.e., assigning parameters to the Map instance) the setParameter( ) eventhough i am not going to use those parameters in my mapping?

Can i simply put like this, if i am not going to use those params:

public void setParameter( ){ }

Former Member
0 Kudos

Hi senthil,

In the Interface StreanTransformation the prototype of the method declared as : void setParameter(Map)

So we need to define the method like this.

and according to the rule of java every method declared in a interface and if we are implementing that interface then we have to override the methods in the interface.

so here we have to define the setParameter method like:

public void setParameter(Map param) {

map = param;

}

--Sankar Choudhury

Former Member
0 Kudos