Package org.somda.sdc.glue.provider.sco
Annotation Type IncomingSetServiceRequest
-
@Target(METHOD) @Retention(RUNTIME) public @interface IncomingSetServiceRequest
Annotation to define a callback for incoming set service operation calls.The receiving method needs to be parameterized with the following arguments:
Contextinstance- requested data type
Requested data types can be:
Stringfor a SetString requestBigDecimalfor a SetValue requestListofObjectdepending on the argument types for an Activate request- An instance derived from
AbstractMetricStatefor a SetMetricState request - An instance derived from
AbstractAlertStatefor a SetAlertState request - An instance derived from
AbstractDeviceComponentStatefor a SetComponentState request - An instance derived from
AbstractContextStatefor a SetContextState request
The result of the operation is required to be of the type
InvocationResponse, which can be created by usingContext.createSuccessfulResponse(MdibVersion, InvocationState)orContext.createUnsuccessfulResponse(MdibVersion, InvocationState, InvocationError, List).
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>listTypeDefines the data type of a list container that is required due to type erasure.StringoperationHandleDefines the operation handle that triggers the method.
-
-
-
Element Detail
-
operationHandle
String operationHandle
Defines the operation handle that triggers the method.The annotated method is called only if the handle of the operation matches this value. Leave the value empty to match every handle.
- Returns:
- the handle to match for this incoming operation call annotation.
- Default:
- ""
-
-
-
listType
Class<?> listType
Defines the data type of a list container that is required due to type erasure.If the operation payload comes as a list of proposed data items, this type defines the list type that is used to distinguish between different functions that accept lists (required as Java lacks real templates).
- Returns:
- the generic type of the list element. Defaults to
IncomingSetServiceRequest.NoList, which indicates no list type.
- Default:
- org.somda.sdc.glue.provider.sco.IncomingSetServiceRequest.NoList.class
-
-