1. Field of the Invention
The present invention relates to device management (DM), and more particularly to a method for retrieving an object from a DM client and an associated DM system.
2. Description of the Prior Art
In OMA (Open Mobile Alliance) DM (Device Management) Protocol specification, the DM server and client communicate with each other by DM messages. In particular, the DM messages are exchanged between the server and client in a request/response form, that is, after the server/client transmits a message to the client/server, the server/client would not transmit another message until receiving a message in response to the previous-transmitted message from the client/server.
When the server wants to deliver an object to the client, the server would send a DM message containing an Add command and the object to the client. The OMA DM Protocol also supports the large object mechanism to deliver a large object from the server to the client. The large object is an object whose data size is too large to be included and transmitted in a single DM message. Thus, the server would transmit the large object to the client by segmenting the large object into multiple chunks and transmitting each chunk by one message. That is, the server delivers the large object to the client by multiple messages instead of single message.
However, if the server needs to retrieve a large object from the client, the OMA DM Protocol cannot handle this case. When retrieving an object or data from the client, the server sends a message containing a Get command to the client. When receiving the Get command from the server, the client replies a message containing a Result command to the server. If the retrieved object is too large to fit in a message, the server will receive only a message which just contains part of the retrieved object, or get a fail code to indicate the requested object size is too large.
Several OMA DM MOs (Management Object) are popularly implemented, and may contain large data in a node of the client (e.g. FUMO, SCOMO, DiagMonMO, etc.). The large data may contain useful information for the server. If the server cannot retrieve the large data normally, the server may not well perform some functions because of lack of the useful information.
It is therefore one objective of the present invention to provide a method for retrieving an object from a device management (DM) client and an associated DM system, thereby enabling a DM server to retrieve a large object from the DM client.
In one embodiment of the present invention, a method for retrieving an object from a DM client to a DM server is provided. The method comprises steps of: receiving a first message issued from the DM server by the DM client, wherein the first message is used for retrieving the object; segmenting the object into a plurality of chunks by the DM client in response to receiving the first message; and transmitting each of the chunks in a respective second message to the DM server by the DM client, wherein the second message including the last one of the chunks comprises a first element to indicate that there is no more chunk to be transmitted, and the second message including any other one of the chunks includes a second element to indicate that there is at least one more chunk to be transmitted.
In another embodiment of the present invention, a DM client is provided. The DM client comprises: a receiving unit for receiving a first message issued from a DM server, wherein the first message is used by the DM server to retrieve an object from the DM client; a segmenting unit for segmenting the object into a plurality of chunks in response to the received first message; and a transmitting unit for transmitting each of the chunks in a respective second message to the DM server, wherein the second message including the last one of the chunks comprises a first element to indicate that there is no more chunk to be transmitted, and the second message including any other one of the chunks includes a second element to indicate that there is at least one more chunk to be transmitted.
Reference will now to be made in detail to embodiments of the present invention, which are illustrated in the accompanying drawings.
In step 14, the DM client determines whether the next chunk to be transmitted is the last one of the chunks. If so, the method proceeds to step 17; otherwise, the method goes to step 15. In step 17, since the next chunk is the last chunk, the DM client transmits the next chunk to the DM server in a second message which comprises a first element to indicate that there is no more chunk to be transmitted. For example, if the first message received in step 11 comprises the Get command, the second message can comprise a Result command, which is also defined in the OMA DM Protocol, to reply to the Get command. Also, the first element can be a Final element defined in the OMA DM Protocol. When receiving the second message containing the first element, the DM server would know that the requested object has been wholly retrieved. After step 17 is executed, the method is completed.
On the other hand, in step 15, since the next chunk is not the last chunk, the DM client transmits the next chunk to the DM server in a second message which comprises a second element to indicate that there is still at least one more chunk to be transmitted. For example, the second element can be a MoreData element defined in the OMA DM Protocol. When receiving the second message containing the second element, the DM server would reply a third message to the DM client for requesting the next chunk. For example, the third message can comprise an Alert command with an alert code 1222, which is used in the OMA DM Protocol to ask for more messages. The third message can further include a status response of the DM server to the received second message containing the second element. For example, the status response can have a code of 213 to indicate that the chunked item is accepted and buffered, as defined in the OMA DM Protocol. After step 15 is executed, the method then proceeds to step 16.
In step 16, the DM client receives the third message mentioned above from the DM server. Since the third message asks the DM client for the next chunk of the requested object, the method returns to step 14 to start the transmission of the next chunk.
Preferably, the third message received by the DM client in step 16 further comprises a Get command, and the second message including the next chunk of the requested object transmitted by the DM client in steps 15 and 17 comprises a Result command, which can be used to reply to the Get command of the third message.
Furthermore, the receiving unit 411 receives a third message for requesting the next chunk sent from the DM server 42 when the DM server 42 receives the second message including the second element from the transmitting unit 413. For example, the third message can comprise an Alert command with an alert code 1222. The third message can further include a status response of the DM server 42 to the received second message containing the second element. For example, the status response can have a code of 213 to indicate that the chunked item is accepted and buffered. When the receiving unit 411 receives the third message, the transmitting unit 413 would transmit the second message including the next chunk to the DM server 42.
While the present invention has been shown and described with reference to the preferred embodiments thereof and the illustrative drawings, it should not be considered as limited thereby. Various possible modifications and alterations can be conceived by persons skilled without departing from the scope and the spirit of the present invention.
Number | Date | Country | |
---|---|---|---|
61327273 | Apr 2010 | US |