Package com.avsystem.anjay
Interface AnjayObjectAttrHandlers
-
public interface AnjayObjectAttrHandlersInterface specifying handlers for reading and writing attributes.LwM2M Object may implement them to override default implementation from
AnjayAttrStorage, if installed, or to make the attributes support working ifAnjayAttrStorageis not installed.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default AnjayAttributes.ObjectInstanceAttrsinstanceReadDefaultAttrs(int iid, int ssid)A handler that returns default attributes set for the Object Instance.default voidinstanceWriteDefaultAttrs(int iid, int ssid, AnjayAttributes.ObjectInstanceAttrs attrs)A handler that sets default attributes for the Object Instance.default AnjayAttributes.ObjectInstanceAttrsobjectReadDefaultAttrs(int ssid)A handler that returns default attribute values set for the Object.default voidobjectWriteDefaultAttrs(int ssid, AnjayAttributes.ObjectInstanceAttrs attrs)A handler that sets default attribute values for the Object.default AnjayAttributes.ResourceAttrsresourceReadAttrs(int iid, int rid, int ssid)A handler that returns Resource attributes.default voidresourceWriteAttrs(int iid, int rid, int ssid, AnjayAttributes.ResourceAttrs attrs)A handler that sets attributes for given Resource.
-
-
-
Method Detail
-
objectReadDefaultAttrs
default AnjayAttributes.ObjectInstanceAttrs objectReadDefaultAttrs(int ssid) throws java.lang.Exception
A handler that returns default attribute values set for the Object.- Parameters:
ssid- Short Server ID of the server requesting the RPC.- Returns:
- Attributes for the Object.
- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
objectWriteDefaultAttrs
default void objectWriteDefaultAttrs(int ssid, AnjayAttributes.ObjectInstanceAttrs attrs) throws java.lang.ExceptionA handler that sets default attribute values for the Object.- Parameters:
ssid- Short Server ID of the server requesting the RPC.attrs- Attributes to be set for the Object.- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
instanceReadDefaultAttrs
default AnjayAttributes.ObjectInstanceAttrs instanceReadDefaultAttrs(int iid, int ssid) throws java.lang.Exception
A handler that returns default attributes set for the Object Instance.- Parameters:
iid- Checked Object Instance ID.ssid- Short Server ID of the server requesting the RPC.- Returns:
- Attributes for the Object Instance.
- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
instanceWriteDefaultAttrs
default void instanceWriteDefaultAttrs(int iid, int ssid, AnjayAttributes.ObjectInstanceAttrs attrs) throws java.lang.ExceptionA handler that sets default attributes for the Object Instance.- Parameters:
iid- Checked Object Instance ID.ssid- Short Server ID of the server requesting the RPC.attrs- Attributes to set for the Object Instance.- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
resourceReadAttrs
default AnjayAttributes.ResourceAttrs resourceReadAttrs(int iid, int rid, int ssid) throws java.lang.Exception
A handler that returns Resource attributes.- Parameters:
iid- Object Instance ID.rid- Resource ID.ssid- Short Server ID of the LwM2M Server issuing the request.- Returns:
- Attributes for the resource.
- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
resourceWriteAttrs
default void resourceWriteAttrs(int iid, int rid, int ssid, AnjayAttributes.ResourceAttrs attrs) throws java.lang.ExceptionA handler that sets attributes for given Resource.- Parameters:
iid- Object Instance ID.rid- Resource ID.ssid- Short Server ID of the LwM2M Server issuing the request.attrs- Attributes to set for this Resource.- Throws:
java.lang.Exception- In case of error. IfAnjayExceptionis thrown with one of defined error codes, the response message will have an appropriate CoAP response code. Otherwise, the device will respond with an unspecified (but valid) error code.
-
-