OKCs (OpenKnowledge Components) are plug-in components that contain the methods used to solve constraints in the Interaction Models.
An OKC is a jar containing a facade class extending the OKCFacadeImpl class in the kernel and an xml file, called okcinfo.xml describing the component. The jar file can obviously contain other support classes and resources, but the facade class is the one that must expose all the methods that solve constraints.
A method must:
- be public
- return a boolean
- every argument must be of type Argument
More than a single OKC can be used to solve the constraints in an role: the matching process finds the methods corresponding to the constraints in the available OKCs in the peer and creates the adaptors between them.
For example, a role clause like the following:
a(role1, A)::
msg1(X,Y) => a(role2,B) <- C1(X) and C2(Y)
then
msg2(Z) <= a(role2,B)
then
null <- C3(X,Y,Z)
can have the constraints C1,C2,C3 matched to the methods m1,m2 from OKC1 and m4 from OKC2:
role1: OKC1:
C1(X) <---> m1(X)
C2(Y) <---> m2(Y)
m3(J)
...
OKC2
C3(Z) <---> m4(Z)
m5(L)
...
