IDL1.0 Network Servers
Basically, the IDL supports the concept of a virtual network currently, although your server may not at this point. The way it works is that from the NetworkFinder, you would make a call to to retrieve_by_name(String). The other two calls (retreive_by_code and retreive_by_id) are supposed to only return real networks (because virtuals don't have codes or ids, only names), although this is just a comment. In addition, servers should return any virtual networks with the call to retrieve_all as otherwise there is no means for clients to discover their existence programatically.
The return value is NetworkAccess, which is a abstract interface. There are 2 subinterfaces, ConcreteNetworkAccess (the real network one) and VirtualNetworkAccess.
The only real difference between the virtual network and the real one (as far as IDL is concerned) is that the virtual network access has the additional method
ConcreteNetworkAccess get_network_for_channel(ChannelId a_channel)
which returns the "real" network for a channel within the virtual network. All other operations on a regular network work on the virtual, but of course there is the likelyhood that a given station will appear in more than one VirtualNetwork, but should be in only one ConcreteNetwork.
So, if you wanted to make the iris network server capable of handling virtual networks, I don't think it would be much effort. Just create a VirtualNetworkAccessImpl class and return it if a call to retrieve_by_name comes in with the virtual networks name.
Alternatively, there is nothing in the IDL to say that network codes are limited to 2 characters other than convention, so if you use 3 character codes for the virtual networks, they could be the same as existing code. I would recommend that the returned object be a VirtualNetworkAccessImpl instead of a ConcreteNetworkAccess just to allow the clients to easily tell the difference between reals and virtuals as well as being able to find the "real" one.
IDL2.0 Network Servers
The basic structure has not changed in the move to IDL2.0, just a few method names. The changes are:
| IDL1.0 |
IDL2.0 |
| retreive_by_code(NetworkCode code) |
retreive_by_code(NetworkCode code) |
| retreive_by_id(NetworkId id) |
retreiveById(NetworkId id) |
| retrieve_by_name(String) |
retrieveByName(String) |
| get_network_for_channel(ChannelId a_channel) |
getNetworkForChannel(ChannelId id) |