-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiments some LwM2mEndpoint abstraction at Client Side.
- Loading branch information
1 parent
4509977
commit c43ec29
Showing
66 changed files
with
2,911 additions
and
1,293 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
.../src/main/java/org/eclipse/leshan/client/californium/CaliforniumConnectionController.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,23 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 Sierra Wireless and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* and Eclipse Distribution License v1.0 which accompany this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
* and the Eclipse Distribution License is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.html. | ||
* | ||
* Contributors: | ||
* Sierra Wireless - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.leshan.client.californium; | ||
|
||
import org.eclipse.californium.core.network.Endpoint; | ||
import org.eclipse.leshan.client.servers.ServerIdentity; | ||
|
||
public interface CaliforniumConnectionController { | ||
void forceReconnection(Endpoint endpoint, ServerIdentity identity, boolean resume); | ||
} |
469 changes: 0 additions & 469 deletions
469
...t-cf/src/main/java/org/eclipse/leshan/client/californium/CaliforniumEndpointsManager.java
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...-cf/src/main/java/org/eclipse/leshan/client/californium/CaliforniumIdentityExtractor.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,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 Sierra Wireless and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* and Eclipse Distribution License v1.0 which accompany this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
* and the Eclipse Distribution License is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.html. | ||
* | ||
* Contributors: | ||
* Sierra Wireless - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.leshan.client.californium; | ||
|
||
import org.eclipse.californium.core.network.Exchange.Origin; | ||
import org.eclipse.californium.core.server.resources.CoapExchange; | ||
import org.eclipse.californium.elements.EndpointContext; | ||
import org.eclipse.leshan.core.request.Identity; | ||
|
||
public abstract class CaliforniumIdentityExtractor { | ||
|
||
protected EndpointContext getForeignPeerContext(CoapExchange exchange) { | ||
return exchange.advanced().getOrigin() == Origin.REMOTE ? exchange.advanced().getRequest().getSourceContext() | ||
: exchange.advanced().getRequest().getDestinationContext(); | ||
} | ||
|
||
public abstract Identity getIdentity(CoapExchange exchange); | ||
|
||
} |
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
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
Oops, something went wrong.