It's currently not feasible to have more than one instance of your jSpace program open because there is really no other way to handle creating a ServerGate than to hardcode the port.
So i would really like to be able to do something like this:
SpaceRepository rep = new SpaceRepository();
final int portUsed = rep.addGate("tcp://127.0.0.1:/?conn");
To add a gate without a specific port in mind, the port is simply omitted from the URI. addGate would then have to be changed to return the port that the socket chose to use.
How the port is then transfered to the RemoteSpace is still a hassle but another issue will tackle that problem.
It's currently not feasible to have more than one instance of your jSpace program open because there is really no other way to handle creating a ServerGate than to hardcode the port.
So i would really like to be able to do something like this:
To add a gate without a specific port in mind, the port is simply omitted from the URI. addGate would then have to be changed to return the port that the socket chose to use. How the port is then transfered to the RemoteSpace is still a hassle but another issue will tackle that problem.