Package com.avsystem.anjay
Class AnjayOutputContext
- java.lang.Object
-
- com.avsystem.anjay.AnjayOutputContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public final class AnjayOutputContext extends java.lang.Object implements java.lang.AutoCloseableContext which is used to send values to the LwM2M Server.
-
-
Constructor Summary
Constructors Constructor Description AnjayOutputContext(com.avsystem.anjay.impl.NativeOutputContextPointer pointer)Creates output context - it is not intended to be called by user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the context - it is not intended to be called by user.voidretBoolean(boolean value)Returns a boolean value from the data model handler.voidretBytes(byte[] array)Returns bytes from the data model handler.voidretBytes(byte[] array, int offset, int length)Returns bytes from the data model handler.AnjayBytesContextretBytes(int length)CreatesAnjayBytesContextwhich may be used to return bytes from the data model.voidretBytes(java.nio.ByteBuffer buffer)Returns bytes from the data model handler.voidretDouble(double value)Returns a double value from the data model handler.voidretFloat(float value)Returns a float value from the data model handler.voidretInt(int value)Returns an integer from the data model handler.voidretLong(long value)Returns a long integer from the data model handler.voidretObjlnk(Anjay.Objlnk value)Returns an Object Link value from the data model handler.voidretString(java.lang.String value)Returns a string from the data model handler.
-
-
-
Method Detail
-
close
public void close()
Closes the context - it is not intended to be called by user.- Specified by:
closein interfacejava.lang.AutoCloseable
-
retInt
public void retInt(int value) throws AnjayExceptionReturns an integer from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retLong
public void retLong(long value) throws AnjayExceptionReturns a long integer from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retFloat
public void retFloat(float value) throws AnjayExceptionReturns a float value from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retDouble
public void retDouble(double value) throws AnjayExceptionReturns a double value from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retBoolean
public void retBoolean(boolean value) throws AnjayExceptionReturns a boolean value from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retString
public void retString(java.lang.String value) throws AnjayExceptionReturns a string from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retObjlnk
public void retObjlnk(Anjay.Objlnk value) throws AnjayException
Returns an Object Link value from the data model handler.- Parameters:
value- The value to return.- Throws:
AnjayException- In case of failure.
-
retBytes
public AnjayBytesContext retBytes(int length) throws AnjayException
CreatesAnjayBytesContextwhich may be used to return bytes from the data model.- Parameters:
length- Number of bytes to return.- Throws:
AnjayException- In case of failure.
-
retBytes
public void retBytes(java.nio.ByteBuffer buffer) throws AnjayExceptionReturns bytes from the data model handler.- Parameters:
buffer- Bytes to return.- Throws:
AnjayException- In case of failure.
-
retBytes
public void retBytes(byte[] array, int offset, int length) throws AnjayExceptionReturns bytes from the data model handler.- Parameters:
array- Array of bytes.offset- Offset inarrayto start reading from.length- Length of the data to return.- Throws:
AnjayException- In case of failure.
-
retBytes
public void retBytes(byte[] array) throws AnjayExceptionReturns bytes from the data model handler.- Parameters:
array- Array of bytes to return.- Throws:
AnjayException- In case of failure.
-
-