(no commit message)
[utils] / system / general / src / test / java / org / wamblee / system / Environment.java
1 package org.wamblee.system;
2
3 import javax.sql.DataSource;
4
5
6 public class Environment extends AbstractComponent {
7         
8         private static final ProvidedInterfaceDescriptor[] PROVIDED = 
9                 new ProvidedInterfaceDescriptor[] { 
10                         new DefaultProvidedInterfaceDescriptor("datasource", DataSource.class), 
11                         new DefaultProvidedInterfaceDescriptor("integer", Integer.class)
12         };
13         
14         public Environment(ServiceRegistry aRegistry) { 
15                 super("environment", aRegistry, PROVIDED, new RequiredInterfaceDescriptor[0]);
16         }
17         
18         @Override
19         protected void doStart(String aContext, Service[] aRequiredServices) {
20             addService(aContext, PROVIDED[0], new Integer(1));
21             addService(aContext, PROVIDED[1], new Integer(2));
22         }
23         
24         @Override
25         protected void doStop() {
26                 // Empty.       
27         }
28 }