Each session holds its own copy of the SI data from the Headend.
The benefit of using session based mangament of the data is that it allows you to perform several changes on the data, and apply them all at once, so that the changes are broadcasted in one atomic operation.
So what's that? In JBroadcast you've got two types of session managers:
DataManagers allow you to directly handle the underlying tables, descriptors, streams, etc. Use this when requiring to manipulate low level details of the SI (such as descriptors, distribution of the tables, etc.).
ServiceManagers allow you to manipulate the data on top of a higher level abstraction layer. When operating on a service Manager (i.e: creating a new service) it will take care of all the underlying actions that are needed (i.e: creating the PMT, the entry inside the PAT, the SDT actual&other, etc.)
All changes are done in real time, so both the DataManager and the associated ServiceManager remain in sync.
So let's start with the real stuff
// Create two transports
DVBSITransportStreamLocator locator0 = new DVBSITransportStreamLocator("dvb://10.20");
Transport transport0 = servicemgr.createTransport(locator0);
DVBSITransportStreamLocator locator1 = new DVBSITransportStreamLocator("dvb://10.21");
Transport transport1 = servicemgr.createTransport(locator1);
// Create a network
ArrayList<Transport> transportList = new ArrayList<Transport>();
Service service = sm.createService(new DVBServiceLocator(locator0, 0xa7));
So what have we done so far? We've created two Transports and a Service. Transports carry out all the information. This is managed internally as a Transport Stream by the DataManager.
Both Transport Streams are populated with their PAT, default NIT (using the original network id), SDT elementary stream, etc.
Then we've created a network, with the two transports. Internally this is translated to the creation of a NIT table in each of the transport streams.
Later on we have created a new service with id 0xa7, which produces the following actions:
A PMT with program id 0xa7 is created.
An entry in the PAT is created
SDT actual with service id 0xa7 in the Transport Stream associated with transport0
SDT other with service id 0xa7 in the Transport Stream associated with transport1