Inherits Resource, and IService.
Public Member Functions | |
| void | initGridFromConfiguration () throws FrameworkException |
| void | initGridFromConfiguration (FrameworkConfiguration frameworkConfiguration) throws FrameworkException |
| void | setGridFromFramework (IGridAccess access, FrameworkConfiguration config) |
| Service () | |
| Instantiates a new empty resource java program. | |
| Service (IService resource) | |
| Instantiates a new service by clone from the input service. | |
| Service (String name, List< Data > javaFiles) | |
| Instantiates a new resource java program. | |
| List< Data > | getJavaFiles () |
| String | getName () |
| void | setJavaFiles (List< Data > javaFiles) |
| void | setName (String name) |
Static Public Member Functions | |
| static IService | deploy (File serviceFile) throws FileNotFoundException, InstantiationException |
| Deploy an instance of the service implemented on the class file located at serviceFile. | |
Protected Member Functions | |
| Method | findJobHandlerByName (Class<?> serviceClass, String methodName) throws FrameworkException |
| Facility to returns the callback method that matches with the methodName. | |
Protected Attributes | |
| Grid | grid |
| The grid object this service must operate, and provide grid initialization on different scenarios. | |
| List< Data > | javaFiles |
| The content of java file classes implementing this service. | |
This class is the super class of all user defined services. The service programmer must extends this class to create new api resources. Fills the resource interface and can provide entry point methods (exposed functionalities on api description) and user defined callbacks. Also include its own class file content data.
This class provide the grid object the service uses.
| com.abiquo.api.Service.Service | ( | ) |
Instantiates a new empty resource java program.
Only used on java reflection construction.
| com.abiquo.api.Service.Service | ( | IService | resource | ) |
Instantiates a new service by clone from the input service.
| resource | the resource want to be copied |
| com.abiquo.api.Service.Service | ( | String | name, | |
| List< Data > | javaFiles | |||
| ) |
Instantiates a new resource java program.
| name | the desired resource name | |
| javaFiles | the content of java class files implementing the resource |
| static IService com.abiquo.api.Service.deploy | ( | File | serviceFile | ) | throws FileNotFoundException, InstantiationException [static] |
Deploy an instance of the service implemented on the class file located at serviceFile.
| serviceFile | the file containing the implementation of the service |
| FileNotFoundException | if the file is not found | |
| InstantiationException | if can not create a new object instance from the class object |
| Method com.abiquo.api.Service.findJobHandlerByName | ( | Class<?> | serviceClass, | |
| String | methodName | |||
| ) | throws FrameworkException [protected] |
Facility to returns the callback method that matches with the methodName.
All user defined callback method must have a job as input parameter.
| methodName | the desired method name | |
| serviceClass | class where the callback method is implemented |
| FrameworkException | if the method do not exist or is not accessible |
Grid com.abiquo.api.Service.grid [protected] |
The grid object this service must operate, and provide grid initialization on different scenarios.
NOTE : the grid object can not be used on user defined constructors, as it is not defined yet.
setGridFromFramework()
List<Data> com.abiquo.api.Service.javaFiles [protected] |
The content of java file classes implementing this service.
1.5.5