public class ModuleHandler
extends java.lang.Object
Constructor and Description |
---|
ModuleHandler() |
Modifier and Type | Method and Description |
---|---|
protected static BehaviourModule |
behaviourFromClass(java.lang.Class serviceClass,
Auto service,
PasswordHandler pHandler)
Return a behaviour instance for the service class.
|
static BehaviourModule |
behaviourModule(Auto service,
PasswordHandler pHandler)
Return a behaviour instance for an
Auto-related service. |
protected static ControlModule |
controlFromClass(java.lang.Class serviceClass,
Service service,
PasswordHandler pHandler)
Return a behaviour instance for the service class.
|
static ControlModule |
controlModule(Service service,
PasswordHandler pHandler)
Return a control instance for the service class type.
|
static DataModule |
dataModule(Service service,
PasswordHandler pHandler)
Return a data module instance.
|
static DataModule |
dataModule(Service service,
PasswordHandler pHandler,
org.licas_xml.abs.Element adminDataXml)
Return a data module instance.
|
static java.lang.String |
heuristicClass(java.lang.String heuristicType)
Return a likely heuristic module class type for a description.
|
static boolean |
isAuto(java.lang.Object thisObj)
Return true if the parameter is derived from the
Auto object. |
static boolean |
isAutoManager(java.lang.Object thisObj)
Return true if this module is an autonomic manager.
|
static boolean |
isFrameworkModule(java.lang.Object thisObj)
Return true if the parameter is derived from the
FrameworkModule object. |
static boolean |
isLicasModule(java.lang.Object thisObj)
Return true if the parameter is derived from the
LicasModule object. |
static boolean |
isScriptModule(SM_Service sModule)
Return true if the service module can create and execute a script.
|
static boolean |
isServer(java.lang.Object thisObj)
Return true if the parameter is derived from the
ESB object. |
static boolean |
isService(java.lang.Object thisObj)
Return true if the parameter is derived from the
Service object. |
static boolean |
isServiceModule(java.lang.Object thisObj)
Return true if the parameter is derived from the
ServiceModule object. |
static boolean |
isWrapper(java.lang.Object thisObj)
Return true if this module is a service wrapper.
|
static java.lang.String |
linkClass(java.lang.String linkMethod)
Return a likely linking module class type for a description.
|
static Link |
linkModuleType(java.lang.String linkType,
Service service,
PasswordHandler pHandler)
Return a linking module instance for the linker service type.
|
protected static SM_Service |
moduleFromClass(java.lang.Class serviceClass,
Service service,
PasswordHandler pHandler)
Return a module instance for the service type or class.
|
static SM_Service |
serviceModule(Service service,
PasswordHandler pHandler)
Return a module instance for the service class type.
|
public static boolean isLicasModule(java.lang.Object thisObj)
LicasModule
object.thisObj
- the object to query.public static boolean isFrameworkModule(java.lang.Object thisObj)
FrameworkModule
object.thisObj
- the object to query.public static boolean isServiceModule(java.lang.Object thisObj)
ServiceModule
object.thisObj
- the object to query.public static boolean isService(java.lang.Object thisObj)
Service
object.thisObj
- the object to query.public static boolean isAuto(java.lang.Object thisObj)
Auto
object.thisObj
- the object to query.public static boolean isServer(java.lang.Object thisObj)
ESB
object.thisObj
- the object to query.public static boolean isWrapper(java.lang.Object thisObj)
thisObj
- the object to query.public static boolean isAutoManager(java.lang.Object thisObj)
thisObj
- the object to query.AutonomicManager
, false otherwise.public static boolean isScriptModule(SM_Service sModule)
sModule
- the service module. Should be script or link data type.public static SM_Service serviceModule(Service service, PasswordHandler pHandler) throws java.lang.Exception
Service-related
classes, the base class is fully implemented and so the most basic module can always
be returned. A closest superclass match is used if a direct match is not available.service
- the service instance.pHandler
- the password handler.java.lang.Exception
- any error.public static ControlModule controlModule(Service service, PasswordHandler pHandler) throws java.lang.Exception
Service-related
classes, this might simply be to retrieve some data, but with the Auto-related
classes, the behaviour methods might need to be implemented. Note that the abstract
behaviourAction
is still implemented in the service itself and can make use
of a BehaviourModule
to evaluate this.service
- the service instance.pHandler
- the password handler.java.lang.Exception
- any error.public static BehaviourModule behaviourModule(Auto service, PasswordHandler pHandler) throws java.lang.Exception
Auto-related
service. The behaviour
needs to be able to carry out the evaluation as part of the behaviourAction
method. It can do this in whole, or in part and has a slightly different interface.service
- the service instance. Must be Auto
or derived.pHandler
- the password handler.java.lang.Exception
- any error.public static DataModule dataModule(Service service, PasswordHandler pHandler) throws java.lang.Exception
service
- the service instance.pHandler
- the password handler.java.lang.Exception
- any error.public static DataModule dataModule(Service service, PasswordHandler pHandler, org.licas_xml.abs.Element adminDataXml) throws java.lang.Exception
service
- the parent service.pHandler
- the parent password handler.adminDataXml
- xml description to create the data resource from.java.lang.Exception
- any error.public static Link linkModuleType(java.lang.String linkType, Service service, PasswordHandler pHandler) throws java.lang.Exception
linkType
- the linker type. For example ServiceConst
.LINKER
.service
- the service instance.pHandler
- the password handler.java.lang.Exception
- any error.protected static SM_Service moduleFromClass(java.lang.Class serviceClass, Service service, PasswordHandler pHandler) throws java.lang.Exception
serviceClass
- the service class type the module is for.service
- the service instance.pHandler
- the password handler.null
if not recognised.java.lang.Exception
- any error.protected static ControlModule controlFromClass(java.lang.Class serviceClass, Service service, PasswordHandler pHandler) throws java.lang.Exception
serviceClass
- the service class type the module is for.service
- the service instance.pHandler
- the password handler.null
if not recognised.java.lang.Exception
- any error.protected static BehaviourModule behaviourFromClass(java.lang.Class serviceClass, Auto service, PasswordHandler pHandler) throws java.lang.Exception
serviceClass
- the service class type.service
- the service instance.pHandler
- the password handler.null
if not recognised.java.lang.Exception
- any error.public static java.lang.String heuristicClass(java.lang.String heuristicType)
heuristicType
- description of the heuristic features.null
if not recognised.public static java.lang.String linkClass(java.lang.String linkMethod)
linkMethod
- description of the function of the linking class, probably
created by LinkConfig
.addLinkMethod
.