Fix local server for multiple applications
There was a historic bug/limitation, due to the
diameter.comm module design. We were not able to
set two (or more) origin hosts sharing the same
local server. So, we needed to set different ports
(3868, 3869, etc.) to listen for different diameter
applications as a server.
This was because a poor design where LocalServer was
tied to specific engine, and then, depending on when
the service was registered (services.xml), one engine
or the other was enabled to manage traffic. So, the
server was unable to respond correctly one of the
applications.
We have implemented a map of remote origin hosts
with local origin hosts, and when we have a
reception, we check the origin host of the
message and retrieve the own origin host which was
configured for it. This is primarly done at CER/CEA
exchange. When the CER arrives, we get the
Auth-Application-Id, and we know the corresponding
stack and answer in consequence. Also, we store
the relation remote-local origin host in the
origin host manager map.
All the virtual methods must carry the origin host
which applies, to operate. Also, many virtuals with
default empty implementation but not used have been
removed.
Reacting answers are now stored in specific origin
host. We could even improve the fact that operated
host is not needed to be set when programming
reacting answers, because all depends on the origin
host for those answers. But this way, we allow to
do rare things (tests).
CER and DWR configuration have been separated.
And setClientCER now have specific prototype for
default CER, which needs the application-id which
will be set as Auth-Application-Id.
Entity and client sessions, still keep a_engine
most of the cases.
Component Test have been tested OK.
New version will be 1.0.6
34 files changed: