Using the example in the API illustration if the multiplicity of both ports is 10, you would link the objects as follows:
for (int i+0; i<10; ++1) {
a.getSrcAt(i)->setItsJ(b.getMonAt(i)->getItsJ());
b.getMonAt(i)->setItsI(a.getSRcAt(i)->getItsI());
}