View Javadoc

1   package com.ontotext.ordi.wsmo4rdf.remote.server;
2   
3   import com.ontotext.ordi.wsmo4rdf.WsmoConnection;
4   import com.ontotext.ordi.wsmo4rdf.WsmoSource;
5   
6   public class RegistryManager {
7       private Registry<WsmoConnection> wsmoConnectionRegistry;
8       private Registry<WsmoSource> wsmoSourceRegistry;
9   
10      private static RegistryManager instance;
11  
12      private RegistryManager() {
13  	super();
14  	wsmoConnectionRegistry = new Registry<WsmoConnection>(Configuration.newInstance().getMaxConnections());
15  	wsmoSourceRegistry = new Registry<WsmoSource>(Configuration.newInstance().getMaxSources());
16      }
17      
18      public static RegistryManager getInstance() {
19  	if (instance == null) {
20  	    instance = new RegistryManager();
21  	}
22  	assert(instance != null);
23  	return instance;
24      }
25      
26      public Registry<WsmoSource> getWsmoSourceRegistry() {
27  	return this.wsmoSourceRegistry;
28      }
29      
30      public Registry<WsmoConnection> getWsmoConnectionRegistry() {
31  	return this.wsmoConnectionRegistry;
32      }
33  }