org.universAAL.middleware.api
Class SimpleServiceRegistrator

Package class diagram package SimpleServiceRegistrator
java.lang.Object
  extended by org.universAAL.middleware.api.SimpleServiceRegistrator

public class SimpleServiceRegistrator
extends Object

Main class of Simpified API approach. It is responsible for scanning provided object interfaces for occurences of SimplifiedAPI annotations, generating ServiceProfiles, and creating ServiceCallee wrappers. In all methods if not all information was provided in @Input or @Output annotations it generates default values:

Author:
dzmuda

Field Summary
 ModuleContext mc
           
 
Constructor Summary
SimpleServiceRegistrator(ModuleContext mc)
           
 
Method Summary
 void registerService(Object o)
          Main method of Simplified API approach.
 void unregisterAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mc

public ModuleContext mc
Constructor Detail

SimpleServiceRegistrator

public SimpleServiceRegistrator(ModuleContext mc)
Method Detail

registerService

public void registerService(Object o)
                     throws SimplifiedRegistrationException
Main method of Simplified API approach. It scans provided object for occurrences of : 1. @UniversAALService and @ResourceClass annotation on one of its interfaces; 2. Methods of founded interface for occurrences of @ServiceOperation, @Output, and @ChangeEffect annotation; 3. Parameters of methods for occurrences of @Input annotations. For each founded method it generates a proper ServiceProfile and create a ServiceCalleeWrapper instance. If something goes wrong during processing a SimplifiedRegistrationException, especially when: 1. No @UniversAALService and @ResourceClass is found on object interfaces; 2. No @ServiceOperation was provided for @UniversAALService annotated interface; 3. Duplicate names of service was provided (@ServiceOperation); 4. No @Output annotation was provided for method annotated with @ServiceOperation; 5. Duplicate names was provided in @Input annotations of service method;

Parameters:
o - - service implementation, which implements annotated UniversAAL interface
Throws:
SimplifiedRegistrationException

unregisterAll

public void unregisterAll()


Copyright © 2014 universAAL Consortium. All Rights Reserved.