-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new send API (async with ticket)
- Loading branch information
1 parent
9479dde
commit aeb7586
Showing
4 changed files
with
167 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
leshan-server-core/src/main/java/org/eclipse/leshan/server/response/ResponseListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016 Bosch Software Innovations GmbH and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Eclipse Distribution License v1.0 which accompany this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* and the Eclipse Distribution License is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.html. | ||
* | ||
* Contributors: | ||
* Bosch Software Innovations GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.leshan.server.response; | ||
|
||
import org.eclipse.leshan.core.response.LwM2mResponse; | ||
|
||
/** | ||
* The listener is responsible for handling all the success and error responses for a given requestTicket. | ||
*/ | ||
public interface ResponseListener { | ||
|
||
/** | ||
* this method is invoked when a response is received from LWM2M Client correlated by the request ticket. | ||
* | ||
* @param clientEndpoint unique identifier of the LWM2M client | ||
* @param requestTicket globally unique identifier used to correlate the response to the orginial request | ||
* @param response from LWM2M client | ||
*/ | ||
void onResponse(String clientEndpoint, String requestTicket, LwM2mResponse response); | ||
|
||
/** | ||
* this method is invoked when a an error response is received from LWM2M Client correlated by the request ticket. | ||
* | ||
* @param clientEndpoint unique identifier of the LWM2M client | ||
* @param requestTicket globally unique identifier used to correlate the response to the orginial request | ||
* @param exception error from LWM2M client | ||
*/ | ||
void onError(String clientEndpoint, String requestTicket, Exception exception); | ||
} |