{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/leshan/issues/126","repository_url":"https://api.github.com/repos/eclipse/leshan","labels_url":"https://api.github.com/repos/eclipse/leshan/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/leshan/issues/126/comments","events_url":"https://api.github.com/repos/eclipse/leshan/issues/126/events","html_url":"https://github.com/eclipse/leshan/pull/126","id":151320356,"number":126,"title":"Queue mode","user":{"login":"balsmn","id":17613889,"avatar_url":"https://avatars.githubusercontent.com/u/17613889?v=3","gravatar_id":"","url":"https://api.github.com/users/balsmn","html_url":"https://github.com/balsmn","followers_url":"https://api.github.com/users/balsmn/followers","following_url":"https://api.github.com/users/balsmn/following{/other_user}","gists_url":"https://api.github.com/users/balsmn/gists{/gist_id}","starred_url":"https://api.github.com/users/balsmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balsmn/subscriptions","organizations_url":"https://api.github.com/users/balsmn/orgs","repos_url":"https://api.github.com/users/balsmn/repos","events_url":"https://api.github.com/users/balsmn/events{/privacy}","received_events_url":"https://api.github.com/users/balsmn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T07:49:57Z","updated_at":"2016-04-27T08:04:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eclipse/leshan/pulls/126","html_url":"https://github.com/eclipse/leshan/pull/126","diff_url":"https://github.com/eclipse/leshan/pull/126.diff","patch_url":"https://github.com/eclipse/leshan/pull/126.patch"},"body":"# Intro\r\n\r\nA **Queue mode** is an operation mode of LWM2M protocol (since the early versions\r\nof Lightweight M2M 1.0 Specification), which describes a special operation mode\r\nof a server/client if a client is not always expected to be online.\r\n\r\nThe specification states that:\r\n\r\n    A Client has to register using specified binding mode (e.g. using \"UQ\" for \"UDP+Queue\");\r\n    A Server has to understand this binding mode (it is mandatory);\r\n    A client is not expected to be always online - instead, a server must queue the requests and only allowed to send downlink requests one by one to the client when server received client's registration update or notification.\r\n\r\nThis particular pull request contains classes splitted in two main packages:\r\n\r\n-    **org.eclipse.leshan.server.queue** - contains base interfaces to operate with queue mode, i.e. public API for sending downlink requests and for holding messages in a message store;\r\n-     **org.eclipse.leshan.server.queue.impl** - provides an InMemory implementation of the message store and for deliverying the messages to the client and processing of responses.\r\n\r\n# org.eclipse.leshan.server.queue - Queue Mode Public API\r\n## MessageStore\r\nProvides methods for adding a message for a client, removing, getting the first message and for emptying the queue of a client. Once the message is put in the queue, it will eventually be delivered to a client if it is reachable or when the client becomes reachable. If a client de-registers or its life time has expired, then the queue is emptied.\r\n\r\n## QueuedRequest\r\n\r\nA single element of a queue is represented by a QueuedRequest. Amongst the downlink request  it also holds the request Id for tracking the response context and the client's endpoint.\r\n\r\n## QueuedRequestFactory\r\n\r\nProvides factory methods to create the above defined QueuedRequest that could be stored in a message store.\r\n\r\n## ClientState\r\n\r\nContains different states of a client that are relevant for delivery of queued messages. There are certain valid state transitions that concrete implementations needs to enforce so as to get a consistent processing of queued messages. The valid state transitions are as explained below.\r\n\r\n- Once the client gets connected to the LWM2M Server it is considered to be **_REACHABLE_**. \r\n- Client is in state **_RECEIVING_** before receving any messages.\r\n- When no more messages are left in the queue, the client is in state **_REACHABLE_**.\r\n- When a client times out on a message, it is in state **_UNREACHABLE_**.\r\n- When a client sends a register-update or a notify, then client state is changed from **_UNREACHABLE_** to **_REACHABLE_**.\r\n\r\n# org.eclipse.leshan.server.queue.impl - Queue Mode Implementation\r\n\r\n## InMemoryMessageStore\r\n\r\nProvides an InMemory implementation of the MessageStore for holding queued messages until the client is available again or client has de-registered (either by sending a de-register message or when client life time is up).\r\n\r\n## QueuedRequestSender\r\n\r\nQueuedRequestSender is an entry point for queue mode related message sending.\r\nThis is basically an extension of LwM2mRequestSender, which is capable of maintaining a queue of requests for every client registered with queue binding mode and delivers the messages to the client one after other when they are online.\r\n\r\n## ClientStateTracker\r\n\r\nProvides methods for state transitions and enforces valid state transitions define above in ClientState.\r\n\r\nAlso-by: Alexander Ellwein alexander.ellwein@bosch-si.com\r\n\r\nAlso-by: Daniel Maier daniel.maier@bosch-si.com\r\n\r\nSigned-off-by: Balasubramanian Azhagappan balasubramanian.azhagappan@bosch-si.com"},"comment":{"url":"https://api.github.com/repos/eclipse/leshan/issues/comments/215003294","html_url":"https://github.com/eclipse/leshan/pull/126#issuecomment-215003294","issue_url":"https://api.github.com/repos/eclipse/leshan/issues/126","id":215003294,"user":{"login":"balsmn","id":17613889,"avatar_url":"https://avatars.githubusercontent.com/u/17613889?v=3","gravatar_id":"","url":"https://api.github.com/users/balsmn","html_url":"https://github.com/balsmn","followers_url":"https://api.github.com/users/balsmn/followers","following_url":"https://api.github.com/users/balsmn/following{/other_user}","gists_url":"https://api.github.com/users/balsmn/gists{/gist_id}","starred_url":"https://api.github.com/users/balsmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balsmn/subscriptions","organizations_url":"https://api.github.com/users/balsmn/orgs","repos_url":"https://api.github.com/users/balsmn/repos","events_url":"https://api.github.com/users/balsmn/events{/privacy}","received_events_url":"https://api.github.com/users/balsmn/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T08:04:57Z","updated_at":"2016-04-27T08:04:57Z","body":"@sbernard31 I have signed CLA and have checked its validity. Also tried with multiple Signed-off-by with my full name, no name just email id, without line breaks, with line breaks after Signed-Off-by. I also checked my email id in my profile. I have only one email in my account. Still IP Validation doesn't go through. \r\n\r\nIs there any special format for Signed-Off-by. I used eclipse IDE to Signed-Off."}}