View Javadoc

1   package org.neo.swarm;
2   
3   import java.io.Serializable;
4   import java.util.Collection;
5   
6   import org.neo.swarm.core.aop.Aspect;
7   import org.neo.swarm.core.aop.silc.comp.Invocation;
8   import org.neo.swarm.core.aop.silc.comp.Perspective;
9   
10  /***
11   * @author damiang
12   */
13  public interface ApplicationContext extends Serializable {
14  
15      void start();
16  
17      void stop();
18  
19      void addAspect(Aspect aspect);
20      
21      void addOrthogonalAspect(Aspect aspect);
22  
23      void addCachedComponent(Object key, Class implementation);
24  
25      void addComponent(Object key, Class implementation);
26  
27      void addCachedComponent(Object key, Class impl, Object[] args);
28  
29      void addComponent(Object key, Class impl, Object[] args);
30  
31      void addPreConstructedComponent(String name, Object object);
32  
33      Collection retrieveComponentsOfType(Class type);
34  
35      Collection retrieveComponentsOfType(Perspective perspective, Class type);
36  
37      Object retrieveComponent(Object key);
38      
39      void removeComponent(Object key);
40  
41      Object retrieveComponent(Perspective perspective, Object key);
42  
43      Object inject(Object key, Invocation invocation) throws Exception ;
44  
45      String getURI();
46  
47  }