├── .github ├── ISSUE_TEMPLATE │ ├── 1_question.yml │ └── 2_bug_report.yml ├── actions │ ├── androidcheck │ │ ├── action.yml │ │ └── comment.txt │ ├── build │ │ ├── action.yml │ │ └── comment.txt │ ├── buildstatus │ │ ├── action.yml.txt │ │ └── comment.txt │ ├── checkstyle │ │ ├── action.yml │ │ └── comment.txt │ ├── formatter │ │ ├── action.yml │ │ └── comment.txt │ ├── integrationtests │ │ ├── action.yml │ │ └── comment.txt │ ├── javadoc │ │ ├── action.yml │ │ └── comment.txt │ ├── nomerge │ │ ├── action.yml │ │ └── comment.txt │ ├── semvercheck │ │ ├── action.yml │ │ └── comment.txt │ ├── sortimport │ │ ├── action.yml │ │ └── comment.txt │ ├── sortpom │ │ ├── action.yml │ │ └── comment.txt │ ├── unittests │ │ ├── action.yml │ │ └── comment.txt │ └── utils │ │ └── addcomment │ │ └── action.yml ├── images │ ├── Leshan_social_preview.png │ └── Leshan_social_preview.xcf ├── pull_request_template.md └── workflows │ ├── commentPR.yml │ ├── delete_workflow.yml │ ├── dependency-update.yml │ ├── main.yml │ └── scorecard-analysis.yml ├── .gitignore ├── .jenkins ├── ci.jenkins ├── nightly.jenkins ├── release.jenkins ├── test.jenkins └── weekly.jenkins ├── .trivyignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.BSD-3-Clause ├── LICENSE.EPL-2 ├── README.md ├── SECURITY.md ├── about.html ├── build-config ├── demo-build-config │ ├── jar-with-dependencies-with-logback.xml │ └── pom.xml ├── lib-build-config │ └── pom.xml └── pom.xml ├── documentation └── Requirement.md ├── eclipse ├── checkstyle.xml ├── eclipse-code-style.xml ├── java.header └── settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.core.runtime.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── leshan-demo-bsserver ├── logback-config.xml ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── leshan │ │ │ └── demo │ │ │ └── bsserver │ │ │ ├── JSONFileBootstrapStore.java │ │ │ ├── LeshanBootstrapServerDemo.java │ │ │ ├── cli │ │ │ └── LeshanBsServerDemoCLI.java │ │ │ ├── json │ │ │ ├── ByteArraySerializer.java │ │ │ ├── EnumSetBindingModeDeserializer.java │ │ │ ├── EnumSetDeserializer.java │ │ │ └── EnumSetSerializer.java │ │ │ └── servlet │ │ │ ├── BootstrapServlet.java │ │ │ └── EventServlet.java │ │ └── resources │ │ ├── credentials │ │ ├── server_cert.der │ │ └── server_privkey.der │ │ └── webapp │ │ └── index.html └── webapp │ ├── .gitignore │ ├── README.md │ ├── eslint.config.js │ ├── index.html │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── public │ └── favicon.png │ ├── src │ ├── App.vue │ ├── components │ │ ├── bsconfig │ │ │ ├── BsPskInput.vue │ │ │ ├── BsRpkInput.vue │ │ │ ├── BsSecurityInput.vue │ │ │ ├── BsServerInput.vue │ │ │ └── BsX509Input.vue │ │ └── wizard │ │ │ ├── BootstrapServerStep.vue │ │ │ ├── ClientConfigDialog.vue │ │ │ ├── DeleteStep.vue │ │ │ ├── EndpointStep.vue │ │ │ ├── SecurityStep.vue │ │ │ └── ServerStep.vue │ ├── js │ │ └── bsconfigutil.js │ ├── main.js │ ├── plugins │ │ ├── icons.js │ │ └── index.js │ ├── router │ │ └── index.js │ └── views │ │ ├── BootstrapView.vue │ │ └── ClientView.vue │ └── vite.config.js ├── leshan-demo-client ├── logback-config.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── demo │ └── client │ ├── DtlsSessionLogger.java │ ├── LeshanClientDemo.java │ ├── MyDevice.java │ ├── MyLocation.java │ ├── RandomTemperatureSensor.java │ └── cli │ ├── IdentitySection.java │ ├── LeshanClientDemoCLI.java │ ├── OscoreSection.java │ └── interactive │ └── InteractiveCommands.java ├── leshan-demo-server ├── .gitignore ├── logback-config.xml ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── leshan │ │ │ └── demo │ │ │ └── server │ │ │ ├── LeshanServerDemo.java │ │ │ ├── cli │ │ │ └── LeshanServerDemoCLI.java │ │ │ ├── model │ │ │ ├── DdfDownloader.java │ │ │ ├── FileLister.java │ │ │ ├── ObjectModelSerDes.java │ │ │ └── ResourceModelSerDes.java │ │ │ └── servlet │ │ │ ├── ClientServlet.java │ │ │ ├── EventServlet.java │ │ │ ├── ObjectSpecServlet.java │ │ │ ├── json │ │ │ ├── JacksonLinkSerializer.java │ │ │ ├── JacksonLwM2mNodeDeserializer.java │ │ │ ├── JacksonLwM2mNodeSerializer.java │ │ │ ├── JacksonRegistrationSerializer.java │ │ │ ├── JacksonRegistrationUpdateSerializer.java │ │ │ ├── JacksonResponseSerializer.java │ │ │ ├── JacksonSecurityDeserializer.java │ │ │ └── JacksonVersionSerializer.java │ │ │ ├── log │ │ │ ├── CoapMessage.java │ │ │ ├── CoapMessageListener.java │ │ │ └── CoapMessageTracer.java │ │ │ └── queuemode │ │ │ └── QueueHandler.java │ │ └── resources │ │ ├── credentials │ │ ├── server_cert.der │ │ └── server_privkey.der │ │ └── webapp │ │ └── index.html └── webapp │ ├── .gitignore │ ├── README.md │ ├── eslint.config.js │ ├── index.html │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── public │ └── favicon.png │ ├── src │ ├── App.vue │ ├── components │ │ ├── ClientInfo.vue │ │ ├── ClientSetting.vue │ │ ├── RequestButton.vue │ │ ├── compositeOperation │ │ │ ├── CompositeObjectControl.vue │ │ │ ├── CompositeObjectDialog.vue │ │ │ ├── CompositeObjectIcons.vue │ │ │ ├── CompositeObjectWriteDialog.vue │ │ │ ├── CompositeObjectsSelector.vue │ │ │ └── CompositeOperationSettingMenu.vue │ │ ├── instance │ │ │ ├── InstanceControl.vue │ │ │ ├── InstanceCreateDialog.vue │ │ │ ├── InstanceView.vue │ │ │ └── InstanceWriteDialog.vue │ │ ├── object │ │ │ ├── ObjectControl.vue │ │ │ ├── ObjectIcon.vue │ │ │ └── ObjectSelector.vue │ │ ├── resources │ │ │ ├── ResourceControl.vue │ │ │ ├── ResourceInstanceControl.vue │ │ │ ├── ResourceInstanceWriteDialog.vue │ │ │ ├── ResourceWriteDialog.vue │ │ │ ├── input │ │ │ │ ├── LabelledResourceInput.vue │ │ │ │ ├── LabelledResourceInstanceInput.vue │ │ │ │ ├── MultiInstanceResourceInput.vue │ │ │ │ └── ResourceInput.vue │ │ │ └── view │ │ │ │ ├── MultiInstancesResourceView.vue │ │ │ │ ├── ResourceDefinitionView.vue │ │ │ │ ├── ResourceExpansionPanel.vue │ │ │ │ ├── ResourceInstanceExpansionPanel.vue │ │ │ │ ├── ResourceInstanceView.vue │ │ │ │ ├── ResourceView.vue │ │ │ │ ├── SimpleResourceInstanceView.vue │ │ │ │ └── SimpleResourceView.vue │ │ └── values │ │ │ └── input │ │ │ ├── BooleanValueInput.vue │ │ │ ├── DateTimeValueInput.vue │ │ │ ├── ObjLinkValueInput.vue │ │ │ ├── OpaqueValueInput.vue │ │ │ └── SingleValueInput.vue │ ├── js │ │ ├── lwm2mpath.js │ │ ├── restutils.js │ │ ├── utils.js │ │ └── valueutils.js │ ├── main.js │ ├── plugins │ │ ├── icons.js │ │ ├── index.js │ │ ├── preference.js │ │ └── store.js │ ├── router │ │ └── index.js │ └── views │ │ ├── ClientView.vue │ │ ├── ClientsView.vue │ │ ├── CompositeObjectView.vue │ │ ├── CompositeOperationView.vue │ │ ├── ObjectView.vue │ │ └── SecurityView.vue │ └── vite.config.js ├── leshan-demo-servers-shared ├── pom.xml ├── src │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── demo │ │ └── servers │ │ ├── cli │ │ ├── DtlsSection.java │ │ ├── GeneralSection.java │ │ ├── IdentitySection.java │ │ └── converters │ │ │ └── ServerCIDConverter.java │ │ └── json │ │ ├── JacksonSecurityDeserializer.java │ │ ├── JacksonSecuritySerializer.java │ │ ├── PublicKeySerDes.java │ │ ├── X509CertificateSerDes.java │ │ └── servlet │ │ ├── LeshanDemoServlet.java │ │ ├── SecurityServlet.java │ │ └── ServerServlet.java └── webapp │ ├── jsconfig.json │ ├── package.json │ └── src │ ├── assets │ └── image │ │ ├── logo.png │ │ └── multicolor-leshan.png │ ├── components │ ├── LeshanNavBar.vue │ ├── path │ │ └── PathsInput.vue │ └── security │ │ ├── OscoreInput.vue │ │ ├── PskInput.vue │ │ ├── RpkInput.vue │ │ ├── SecurityInfoChip.vue │ │ ├── SecurityInfoDialog.vue │ │ ├── SecurityInfoInput.vue │ │ ├── TlsInput.vue │ │ └── X509Input.vue │ ├── js │ ├── byteutils.js │ └── securityutils.js │ ├── plugins │ ├── axios.js │ ├── dayjs.js │ ├── dialog.js │ ├── sse.js │ └── vuetify.js │ └── views │ ├── About.vue │ └── Server.vue ├── leshan-demo-shared ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── leshan │ │ │ └── demo │ │ │ ├── LeshanProperties.java │ │ │ ├── LwM2mDemoConstant.java │ │ │ ├── cli │ │ │ ├── MultiParameterException.java │ │ │ ├── ShortErrorMessageHandler.java │ │ │ ├── StandardHelpOptions.java │ │ │ ├── VersionProvider.java │ │ │ ├── converters │ │ │ │ ├── CIDConverter.java │ │ │ │ ├── ContentFormatConverter.java │ │ │ │ ├── HexadecimalConverter.java │ │ │ │ ├── InetAddressConverter.java │ │ │ │ ├── LwM2mPathConverter.java │ │ │ │ ├── PortConverter.java │ │ │ │ ├── PrivateKeyConverter.java │ │ │ │ ├── PublicKeyConverter.java │ │ │ │ ├── ResourcePathConverter.java │ │ │ │ ├── StrictlyPositiveIntegerConverter.java │ │ │ │ ├── StringLwM2mPathConverter.java │ │ │ │ ├── TruststoreConverter.java │ │ │ │ ├── VersionConverter.java │ │ │ │ ├── X509CertificateChainConverter.java │ │ │ │ └── X509CertificateConverter.java │ │ │ └── interactive │ │ │ │ ├── InteractiveCLI.java │ │ │ │ ├── JLineInteractiveCommands.java │ │ │ │ └── TerminalAppender.java │ │ │ └── logback │ │ │ ├── ColorAwarePatternLayout.java │ │ │ └── NoColorConverter.java │ └── resources │ │ ├── leshan.properties │ │ └── models │ │ ├── 10-1_0.xml │ │ ├── 10.xml │ │ ├── 10241.xml │ │ ├── 10242.xml │ │ ├── 10243-1_0.xml │ │ ├── 10243.xml │ │ ├── 10244.xml │ │ ├── 10245.xml │ │ ├── 10246.xml │ │ ├── 10247.xml │ │ ├── 10248.xml │ │ ├── 10249.xml │ │ ├── 10250.xml │ │ ├── 10251.xml │ │ ├── 10252.xml │ │ ├── 10253.xml │ │ ├── 10254.xml │ │ ├── 10255.xml │ │ ├── 10256.xml │ │ ├── 10257.xml │ │ ├── 10258.xml │ │ ├── 10259.xml │ │ ├── 10260-1_0.xml │ │ ├── 10260.xml │ │ ├── 10262.xml │ │ ├── 10263.xml │ │ ├── 10264.xml │ │ ├── 10265.xml │ │ ├── 10266.xml │ │ ├── 10267.xml │ │ ├── 10268.xml │ │ ├── 10269.xml │ │ ├── 10270.xml │ │ ├── 10271.xml │ │ ├── 10272.xml │ │ ├── 10273.xml │ │ ├── 10274.xml │ │ ├── 10275.xml │ │ ├── 10276.xml │ │ ├── 10277.xml │ │ ├── 10278.xml │ │ ├── 10279.xml │ │ ├── 10280.xml │ │ ├── 10281.xml │ │ ├── 10282.xml │ │ ├── 10283.xml │ │ ├── 10284.xml │ │ ├── 10286.xml │ │ ├── 10290.xml │ │ ├── 10291.xml │ │ ├── 10292.xml │ │ ├── 10299.xml │ │ ├── 10300.xml │ │ ├── 10308-1_0.xml │ │ ├── 10308.xml │ │ ├── 10309.xml │ │ ├── 10311-1_0.xml │ │ ├── 10311.xml │ │ ├── 10313.xml │ │ ├── 10314.xml │ │ ├── 10315.xml │ │ ├── 10316.xml │ │ ├── 10318.xml │ │ ├── 10319.xml │ │ ├── 10320.xml │ │ ├── 10322.xml │ │ ├── 10323.xml │ │ ├── 10324.xml │ │ ├── 10326.xml │ │ ├── 10327.xml │ │ ├── 10328.xml │ │ ├── 10329.xml │ │ ├── 10330.xml │ │ ├── 10331.xml │ │ ├── 10332.xml │ │ ├── 10333.xml │ │ ├── 10334.xml │ │ ├── 10335.xml │ │ ├── 10336.xml │ │ ├── 10337.xml │ │ ├── 10338.xml │ │ ├── 10339.xml │ │ ├── 10340.xml │ │ ├── 10341.xml │ │ ├── 10342.xml │ │ ├── 10343.xml │ │ ├── 10344.xml │ │ ├── 10345.xml │ │ ├── 10346.xml │ │ ├── 10347.xml │ │ ├── 10348.xml │ │ ├── 10349.xml │ │ ├── 10350.xml │ │ ├── 10351.xml │ │ ├── 10352.xml │ │ ├── 10353.xml │ │ ├── 10354.xml │ │ ├── 10355.xml │ │ ├── 10356.xml │ │ ├── 10357.xml │ │ ├── 10358.xml │ │ ├── 10359.xml │ │ ├── 10360.xml │ │ ├── 10361.xml │ │ ├── 10362.xml │ │ ├── 10363.xml │ │ ├── 10364.xml │ │ ├── 10365.xml │ │ ├── 10366.xml │ │ ├── 10368.xml │ │ ├── 10369.xml │ │ ├── 10371.xml │ │ ├── 10374.xml │ │ ├── 10375.xml │ │ ├── 11-1_0.xml │ │ ├── 11.xml │ │ ├── 12-1_0.xml │ │ ├── 12.xml │ │ ├── 13-1_0.xml │ │ ├── 13.xml │ │ ├── 14.xml │ │ ├── 15-1_0.xml │ │ ├── 15.xml │ │ ├── 16.xml │ │ ├── 18830.xml │ │ ├── 18831.xml │ │ ├── 19.xml │ │ ├── 20.xml │ │ ├── 2048.xml │ │ ├── 2049.xml │ │ ├── 2050.xml │ │ ├── 2051.xml │ │ ├── 2052.xml │ │ ├── 2053.xml │ │ ├── 2054.xml │ │ ├── 2055.xml │ │ ├── 2056.xml │ │ ├── 2057.xml │ │ ├── 22-1_0.xml │ │ ├── 22.xml │ │ ├── 25.xml │ │ ├── 28.xml │ │ ├── 3200-1_0.xml │ │ ├── 3200.xml │ │ ├── 3201-1_0.xml │ │ ├── 3201.xml │ │ ├── 3202-1_0.xml │ │ ├── 3202.xml │ │ ├── 3203-1_0.xml │ │ ├── 3203.xml │ │ ├── 3300-1_0.xml │ │ ├── 3300.xml │ │ ├── 3301-1_0.xml │ │ ├── 3301.xml │ │ ├── 3302-1_0.xml │ │ ├── 3302.xml │ │ ├── 3303-1_0.xml │ │ ├── 3303.xml │ │ ├── 3304-1_0.xml │ │ ├── 3304.xml │ │ ├── 3305-1_0.xml │ │ ├── 3305.xml │ │ ├── 3306-1_0.xml │ │ ├── 3306.xml │ │ ├── 3308-1_0.xml │ │ ├── 3308.xml │ │ ├── 3310-1_0.xml │ │ ├── 3310.xml │ │ ├── 3311.xml │ │ ├── 3312-1_0.xml │ │ ├── 3312.xml │ │ ├── 3313-1_0.xml │ │ ├── 3313.xml │ │ ├── 3314-1_0.xml │ │ ├── 3314.xml │ │ ├── 3315-1_0.xml │ │ ├── 3315.xml │ │ ├── 3316-1_0.xml │ │ ├── 3316.xml │ │ ├── 3317-1_0.xml │ │ ├── 3317.xml │ │ ├── 3318-1_0.xml │ │ ├── 3318.xml │ │ ├── 3319-1_0.xml │ │ ├── 3319.xml │ │ ├── 3320-1_0.xml │ │ ├── 3320.xml │ │ ├── 3321-1_0.xml │ │ ├── 3321.xml │ │ ├── 3322-1_0.xml │ │ ├── 3322.xml │ │ ├── 3323-1_0.xml │ │ ├── 3323.xml │ │ ├── 3324-1_0.xml │ │ ├── 3324.xml │ │ ├── 3325-1_0.xml │ │ ├── 3325.xml │ │ ├── 3326-1_0.xml │ │ ├── 3326.xml │ │ ├── 3327-1_0.xml │ │ ├── 3327.xml │ │ ├── 3328-1_0.xml │ │ ├── 3328.xml │ │ ├── 3329-1_0.xml │ │ ├── 3329.xml │ │ ├── 3330-1_0.xml │ │ ├── 3330.xml │ │ ├── 3331-1_0.xml │ │ ├── 3331.xml │ │ ├── 3332-1_0.xml │ │ ├── 3332.xml │ │ ├── 3333-1_0.xml │ │ ├── 3333.xml │ │ ├── 3334-1_0.xml │ │ ├── 3334.xml │ │ ├── 3335-1_0.xml │ │ ├── 3335.xml │ │ ├── 3336-1_0.xml │ │ ├── 3336-1_1.xml │ │ ├── 3336.xml │ │ ├── 3337-1_0.xml │ │ ├── 3337.xml │ │ ├── 3338-1_0.xml │ │ ├── 3338.xml │ │ ├── 3339.xml │ │ ├── 3340.xml │ │ ├── 3341.xml │ │ ├── 3342-1_0.xml │ │ ├── 3342.xml │ │ ├── 3343.xml │ │ ├── 3344.xml │ │ ├── 3345.xml │ │ ├── 3346-1_0.xml │ │ ├── 3346.xml │ │ ├── 3347-1_0.xml │ │ ├── 3347.xml │ │ ├── 3348-1_0.xml │ │ ├── 3348.xml │ │ ├── 3349-1_0.xml │ │ ├── 3349.xml │ │ ├── 3350-1_0.xml │ │ ├── 3350.xml │ │ ├── 3351.xml │ │ ├── 3352.xml │ │ ├── 3353.xml │ │ ├── 3354.xml │ │ ├── 3355.xml │ │ ├── 3356.xml │ │ ├── 3357.xml │ │ ├── 3358.xml │ │ ├── 3359.xml │ │ ├── 3360.xml │ │ ├── 3361.xml │ │ ├── 3362.xml │ │ ├── 3363.xml │ │ ├── 3364.xml │ │ ├── 3365.xml │ │ ├── 3366.xml │ │ ├── 3367.xml │ │ ├── 3368.xml │ │ ├── 3369.xml │ │ ├── 3370.xml │ │ ├── 3371.xml │ │ ├── 3372.xml │ │ ├── 3373.xml │ │ ├── 3374.xml │ │ ├── 3375.xml │ │ ├── 3376.xml │ │ ├── 3377.xml │ │ ├── 3378.xml │ │ ├── 3379.xml │ │ ├── 3380-1_0.xml │ │ ├── 3380.xml │ │ ├── 3381.xml │ │ ├── 3382.xml │ │ ├── 3383.xml │ │ ├── 3384.xml │ │ ├── 3385.xml │ │ ├── 3386.xml │ │ ├── 3387.xml │ │ ├── 3388.xml │ │ ├── 3389.xml │ │ ├── 3390.xml │ │ ├── 3391.xml │ │ ├── 3392.xml │ │ ├── 3393.xml │ │ ├── 3394.xml │ │ ├── 3395.xml │ │ ├── 3396.xml │ │ ├── 3397.xml │ │ ├── 3398.xml │ │ ├── 3399.xml │ │ ├── 3400.xml │ │ ├── 3401.xml │ │ ├── 3402.xml │ │ ├── 3403.xml │ │ ├── 3404.xml │ │ ├── 3405.xml │ │ ├── 3406.xml │ │ ├── 3407.xml │ │ ├── 3408.xml │ │ ├── 3410.xml │ │ ├── 3411.xml │ │ ├── 3412.xml │ │ ├── 3413.xml │ │ ├── 3414.xml │ │ ├── 3415.xml │ │ ├── 3416.xml │ │ ├── 3417.xml │ │ ├── 3418.xml │ │ ├── 3419.xml │ │ ├── 3420.xml │ │ ├── 3421.xml │ │ ├── 3423.xml │ │ ├── 3424.xml │ │ ├── 3425.xml │ │ ├── 3426.xml │ │ ├── 3427.xml │ │ ├── 3428.xml │ │ ├── 3429.xml │ │ ├── 3430.xml │ │ ├── 3431.xml │ │ ├── 3432.xml │ │ ├── 3433.xml │ │ ├── 3434.xml │ │ ├── 3435.xml │ │ ├── 3436.xml │ │ ├── 3437.xml │ │ ├── 3438.xml │ │ ├── 3439.xml │ │ ├── 3441.xml │ │ ├── 3442.xml │ │ ├── 500.xml │ │ ├── 501.xml │ │ ├── 502.xml │ │ ├── 503.xml │ │ ├── 504.xml │ │ ├── 505.xml │ │ ├── 8.xml │ │ └── 9.xml │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── demo │ └── ValidateDemoModelsTest.java ├── leshan-integration-tests ├── credentials │ ├── clientKeyStore.jks │ ├── generate_credentials.sh │ ├── serverKeyStore.jks │ ├── trustedCaKeyStore.jks │ └── unknownCaKeyStore.jks ├── logback-leshan-test.xml ├── pom.xml └── src │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── integration │ └── tests │ ├── DeleteClientOnlyTest.java │ ├── DeleteTest.java │ ├── DiscoverTest.java │ ├── ExecuteTest.java │ ├── MultiEndpointsTest.java │ ├── QueueModeTest.java │ ├── RedisMultiEndpointsTest.java │ ├── RedisRegistrationTest.java │ ├── RegistrationTest.java │ ├── attributes │ ├── WriteAttributeBootstrapTest.java │ ├── WriteAttributeDiscoverTest.java │ ├── WriteAttributeFailedTest.java │ ├── WriteAttributeHouseKeepingTest.java │ └── WriteAttributeObserveTest.java │ ├── bootstrap │ ├── BootstrapTest.java │ └── SecureBootstrapTest.java │ ├── create │ ├── CreateFailedTest.java │ └── CreateTest.java │ ├── lockstep │ ├── LockStepLwM2mClient.java │ └── LockStepTest.java │ ├── observe │ ├── DynamicIPObserveTest.java │ ├── ObserveCompositeTest.java │ ├── ObserveCompositeTimeStampTest.java │ ├── ObserveServerOnlyTest.java │ ├── ObserveTest.java │ ├── ObserveTimeStampTest.java │ ├── RedisDynamicIPObserveTest.java │ ├── RedisObserveTest.java │ └── TestObserveUtil.java │ ├── oscore │ ├── OscoreBootstrapTest.java │ └── OscoreTest.java │ ├── read │ ├── ReadCompositeTest.java │ ├── ReadFailedTest.java │ ├── ReadMultiValueTest.java │ ├── ReadOpaqueValueTest.java │ └── ReadSingleValueTest.java │ ├── security │ ├── PskTest.java │ ├── RedisPskTest.java │ ├── RedisRpkTest.java │ ├── RedisRpkX509Test.java │ ├── RedisSecurityStoreTest.java │ ├── RedisX509Test.java │ ├── RpkTest.java │ ├── RpkX509Test.java │ ├── SecurityStoreTest.java │ ├── ServerOnlySecurityTest.java │ ├── SniTest.java │ └── X509Test.java │ ├── send │ ├── DynamicIPSendTest.java │ ├── LockStepSendTest.java │ ├── RedisDynamicISendTest.java │ ├── RedisSendTest.java │ ├── SendTest.java │ └── SendTimestampedTest.java │ ├── server │ └── redis │ │ └── RedisRegistrationStoreTest.java │ ├── util │ ├── BootstrapConfigTestBuilder.java │ ├── BootstrapRequestChecker.java │ ├── Credentials.java │ ├── Failure.java │ ├── LeshanProxyBuilder.java │ ├── LeshanTestBootstrapServer.java │ ├── LeshanTestBootstrapServerBuilder.java │ ├── LeshanTestClient.java │ ├── LeshanTestClientBuilder.java │ ├── LeshanTestServer.java │ ├── LeshanTestServerBuilder.java │ ├── RedisTestUtil.java │ ├── ReverseProxy.java │ ├── SinglePSKStore.java │ ├── TestBootstrapConfigStoreTaskProvider.java │ ├── TestObjectLoader.java │ ├── assertion │ │ ├── AbstractLwM2mResponseAssert.java │ │ ├── Assertions.java │ │ ├── DiscoverResponseAssert.java │ │ ├── FailureAssert.java │ │ ├── LeshanTestClientAssert.java │ │ ├── LinkArrayAssert.java │ │ └── LwM2mResponseAssert.java │ ├── cf │ │ ├── CertPair.java │ │ ├── LockstepEndpoint.java │ │ ├── MapBasedCertificateProvider.java │ │ ├── MapBasedRawPublicKeyProvider.java │ │ └── SimpleMessageCallback.java │ └── junit5 │ │ └── extensions │ │ ├── ArgumentsUtil.java │ │ ├── BeforeEachParameterizedResolver.java │ │ └── MappedParameterContext.java │ └── write │ ├── WriteCompositeTest.java │ ├── WriteFailedTest.java │ ├── WriteMultiValueTest.java │ ├── WriteOpaqueValueTest.java │ └── WriteSingleValueTest.java ├── leshan-lwm2m-bsserver ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── bsserver │ │ ├── BootstrapConfig.java │ │ ├── BootstrapConfigStore.java │ │ ├── BootstrapConfigStoreTaskProvider.java │ │ ├── BootstrapFailureCause.java │ │ ├── BootstrapHandler.java │ │ ├── BootstrapHandlerFactory.java │ │ ├── BootstrapSession.java │ │ ├── BootstrapSessionAdapter.java │ │ ├── BootstrapSessionDispatcher.java │ │ ├── BootstrapSessionListener.java │ │ ├── BootstrapSessionManager.java │ │ ├── BootstrapTaskProvider.java │ │ ├── BootstrapUtil.java │ │ ├── ConfigurationChecker.java │ │ ├── DefaultBootstrapAuthorizer.java │ │ ├── DefaultBootstrapHandler.java │ │ ├── DefaultBootstrapSession.java │ │ ├── DefaultBootstrapSessionManager.java │ │ ├── EditableBootstrapConfigStore.java │ │ ├── InMemoryBootstrapConfigStore.java │ │ ├── InvalidConfigurationException.java │ │ ├── LeshanBootstrapServer.java │ │ ├── LeshanBootstrapServerBuilder.java │ │ ├── LwM2mBootstrapRequestSender.java │ │ ├── SmsSecurityMode.java │ │ ├── endpoint │ │ ├── BootstrapServerEndpointToolbox.java │ │ ├── CompositeBootstrapServerEndpointsProvider.java │ │ ├── DefaultCompositeBootstrapServerEndpointsProvider.java │ │ ├── LwM2mBootstrapServerEndpoint.java │ │ └── LwM2mBootstrapServerEndpointsProvider.java │ │ ├── model │ │ ├── LwM2mBootstrapModelProvider.java │ │ ├── StandardBootstrapModelProvider.java │ │ └── VersionedBootstrapModelProvider.java │ │ ├── request │ │ ├── BootstrapDownlinkRequestSender.java │ │ ├── BootstrapUplinkRequestReceiver.java │ │ ├── DefaultBootstrapDownlinkRequestSender.java │ │ └── DefaultBootstrapUplinkRequestReceiver.java │ │ └── security │ │ ├── BootstrapAuthorizer.java │ │ ├── BootstrapSecurityStore.java │ │ └── BootstrapSecurityStoreAdapter.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── bsserver │ ├── BootstrapConfigTest.java │ ├── BootstrapHandlerTest.java │ └── InMemoryBootstrapConfigStoreTest.java ├── leshan-lwm2m-client ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── client │ │ ├── EndpointsManager.java │ │ ├── LeshanClient.java │ │ ├── LeshanClientBuilder.java │ │ ├── LwM2mClient.java │ │ ├── RegistrationUpdate.java │ │ ├── RegistrationUpdateHandler.java │ │ ├── bootstrap │ │ ├── BaseBootstrapConsistencyChecker.java │ │ ├── BootstrapConsistencyChecker.java │ │ ├── BootstrapHandler.java │ │ ├── BootstrapListener.java │ │ ├── DefaultBootstrapConsistencyChecker.java │ │ └── InvalidStateException.java │ │ ├── endpoint │ │ ├── ClientEndpointToolbox.java │ │ ├── CompositeClientEndpointsProvider.java │ │ ├── DefaultCompositeClientEndpointsProvider.java │ │ ├── DefaultEndpointsManager.java │ │ ├── LwM2mClientEndpoint.java │ │ └── LwM2mClientEndpointsProvider.java │ │ ├── engine │ │ ├── ClientEndpointNameProvider.java │ │ ├── DefaultClientEndpointNameProvider.java │ │ ├── DefaultRegistrationEngine.java │ │ ├── DefaultRegistrationEngineFactory.java │ │ ├── RegistrationEngine.java │ │ └── RegistrationEngineFactory.java │ │ ├── notification │ │ ├── DefaultNotificationStrategy.java │ │ ├── NotificationDataStore.java │ │ ├── NotificationManager.java │ │ ├── NotificationStrategy.java │ │ └── checker │ │ │ ├── CriteriaBasedOnValueChecker.java │ │ │ ├── FloatChecker.java │ │ │ ├── IntegerChecker.java │ │ │ └── UnsignedIntegerChecker.java │ │ ├── object │ │ ├── Device.java │ │ ├── LwM2mTestObject.java │ │ ├── Oscore.java │ │ ├── Security.java │ │ └── Server.java │ │ ├── observer │ │ ├── LwM2mClientObserver.java │ │ ├── LwM2mClientObserverAdapter.java │ │ └── LwM2mClientObserverDispatcher.java │ │ ├── request │ │ ├── DefaultDownlinkReceiver.java │ │ ├── DefaultUplinkRequestSender.java │ │ ├── DownlinkRequestReceiver.java │ │ └── UplinkRequestSender.java │ │ ├── resource │ │ ├── BaseInstanceEnabler.java │ │ ├── BaseInstanceEnablerFactory.java │ │ ├── BaseObjectEnabler.java │ │ ├── DummyInstanceEnabler.java │ │ ├── LwM2mInstanceEnabler.java │ │ ├── LwM2mInstanceEnablerFactory.java │ │ ├── LwM2mObjectEnabler.java │ │ ├── LwM2mObjectTree.java │ │ ├── LwM2mRootEnabler.java │ │ ├── NotificationSender.java │ │ ├── NotifySender.java │ │ ├── ObjectEnabler.java │ │ ├── ObjectsInitializer.java │ │ ├── RootEnabler.java │ │ ├── SimpleInstanceEnabler.java │ │ ├── TransactionalObjectListener.java │ │ └── listener │ │ │ ├── ObjectListener.java │ │ │ ├── ObjectsListener.java │ │ │ ├── ObjectsListenerAdapter.java │ │ │ └── ResourceListener.java │ │ ├── security │ │ └── CertificateVerifierFactory.java │ │ ├── send │ │ ├── DataSender.java │ │ ├── DataSenderManager.java │ │ ├── ManualDataSender.java │ │ ├── NoDataException.java │ │ └── SendService.java │ │ ├── servers │ │ ├── DmServerInfo.java │ │ ├── LwM2mServer.java │ │ ├── ServerInfo.java │ │ ├── ServersInfo.java │ │ └── ServersInfoExtractor.java │ │ └── util │ │ └── LinkFormatHelper.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── client │ ├── send │ └── ManualDataSenderTest.java │ ├── servers │ └── LwM2mServerTest.java │ └── util │ ├── BaseInstanceEnablerFactoryTest.java │ ├── LinkFormatHelperTest.java │ ├── ObjectEnablerTest.java │ └── ObjectsInitializerTest.java ├── leshan-lwm2m-core ├── certificates │ ├── certificates.jks │ ├── eclipse.org.pem │ └── generate_certificates.sh ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── leshan │ │ │ ├── core │ │ │ ├── CertificateUsage.java │ │ │ ├── Destroyable.java │ │ │ ├── LwM2m.java │ │ │ ├── LwM2mId.java │ │ │ ├── MatchingType.java │ │ │ ├── ResponseCode.java │ │ │ ├── SecurityMode.java │ │ │ ├── Startable.java │ │ │ ├── Stoppable.java │ │ │ ├── credentials │ │ │ │ └── CredentialsReader.java │ │ │ ├── endpoint │ │ │ │ ├── DefaultEndPointUriHandler.java │ │ │ │ ├── DefaultEndPointUriParser.java │ │ │ │ ├── EndPointUriHandler.java │ │ │ │ ├── EndPointUriParser.java │ │ │ │ ├── EndpointUri.java │ │ │ │ ├── InvalidEndpointUriException.java │ │ │ │ ├── LwM2mEndpoint.java │ │ │ │ └── Protocol.java │ │ │ ├── json │ │ │ │ ├── JsonArrayEntry.java │ │ │ │ ├── JsonRootObject.java │ │ │ │ ├── LwM2mJsonDecoder.java │ │ │ │ ├── LwM2mJsonEncoder.java │ │ │ │ ├── LwM2mJsonException.java │ │ │ │ └── jackson │ │ │ │ │ ├── JsonArrayEntrySerDes.java │ │ │ │ │ ├── JsonRootObjectSerDes.java │ │ │ │ │ └── LwM2mJsonJacksonEncoderDecoder.java │ │ │ ├── link │ │ │ │ ├── DefaultLinkParser.java │ │ │ │ ├── DefaultLinkSerializer.java │ │ │ │ ├── Link.java │ │ │ │ ├── LinkParseException.java │ │ │ │ ├── LinkParser.java │ │ │ │ ├── LinkSerializer.java │ │ │ │ ├── attributes │ │ │ │ │ ├── Attribute.java │ │ │ │ │ ├── AttributeModel.java │ │ │ │ │ ├── AttributeParser.java │ │ │ │ │ ├── AttributeSet.java │ │ │ │ │ ├── Attributes.java │ │ │ │ │ ├── BaseAttribute.java │ │ │ │ │ ├── ContentFormatAttribute.java │ │ │ │ │ ├── DefaultAttributeParser.java │ │ │ │ │ ├── InvalidAttributeException.java │ │ │ │ │ ├── QuotedStringAttribute.java │ │ │ │ │ ├── ResourceTypeAttribute.java │ │ │ │ │ ├── UnquotedStringAttribute.java │ │ │ │ │ └── ValuelessAttribute.java │ │ │ │ └── lwm2m │ │ │ │ │ ├── DefaultLwM2mLinkParser.java │ │ │ │ │ ├── LwM2mLink.java │ │ │ │ │ ├── LwM2mLinkParser.java │ │ │ │ │ ├── MixedLwM2mLink.java │ │ │ │ │ └── attributes │ │ │ │ │ ├── AccessMode.java │ │ │ │ │ ├── AssignationLevel.java │ │ │ │ │ ├── Attachment.java │ │ │ │ │ ├── AttributeClass.java │ │ │ │ │ ├── AttributeParserUtil.java │ │ │ │ │ ├── BigDecimalAttributeModel.java │ │ │ │ │ ├── DefaultLwM2mAttributeParser.java │ │ │ │ │ ├── DoubleAttributeModel.java │ │ │ │ │ ├── InvalidAttributesException.java │ │ │ │ │ ├── LongAttributeModel.java │ │ │ │ │ ├── LwM2mAttribute.java │ │ │ │ │ ├── LwM2mAttributeModel.java │ │ │ │ │ ├── LwM2mAttributeParser.java │ │ │ │ │ ├── LwM2mAttributeSet.java │ │ │ │ │ ├── LwM2mAttributes.java │ │ │ │ │ ├── LwM2mVersionAttributeModel.java │ │ │ │ │ ├── MixedLwM2mAttributeSet.java │ │ │ │ │ ├── NotificationAttributeTree.java │ │ │ │ │ ├── ObjectVersionAttributeModel.java │ │ │ │ │ ├── PositiveBigDecimalAttributeModel.java │ │ │ │ │ ├── PositiveDoubleAttributeModel.java │ │ │ │ │ ├── PositiveLongAttributeModel.java │ │ │ │ │ └── StringAttributeModel.java │ │ │ ├── model │ │ │ │ ├── DDFFileParser.java │ │ │ │ ├── DDFFileValidator.java │ │ │ │ ├── DDFFileValidatorFactory.java │ │ │ │ ├── DefaultDDFFileValidator.java │ │ │ │ ├── DefaultDDFFileValidatorFactory.java │ │ │ │ ├── DefaultObjectModelValidator.java │ │ │ │ ├── InvalidDDFFileException.java │ │ │ │ ├── InvalidModelException.java │ │ │ │ ├── LwM2mCoreObjectVersionRegistry.java │ │ │ │ ├── LwM2mModel.java │ │ │ │ ├── LwM2mModelRepository.java │ │ │ │ ├── ObjectLoader.java │ │ │ │ ├── ObjectModel.java │ │ │ │ ├── ObjectModelValidator.java │ │ │ │ ├── ResourceModel.java │ │ │ │ ├── StaticModel.java │ │ │ │ └── URN.java │ │ │ ├── node │ │ │ │ ├── InvalidLwM2mPathException.java │ │ │ │ ├── LwM2mChildNode.java │ │ │ │ ├── LwM2mIncompletePath.java │ │ │ │ ├── LwM2mMultipleResource.java │ │ │ │ ├── LwM2mNode.java │ │ │ │ ├── LwM2mNodeException.java │ │ │ │ ├── LwM2mNodeLevel.java │ │ │ │ ├── LwM2mNodeUtil.java │ │ │ │ ├── LwM2mNodeVisitor.java │ │ │ │ ├── LwM2mObject.java │ │ │ │ ├── LwM2mObjectInstance.java │ │ │ │ ├── LwM2mPath.java │ │ │ │ ├── LwM2mPathParser.java │ │ │ │ ├── LwM2mResource.java │ │ │ │ ├── LwM2mResourceInstance.java │ │ │ │ ├── LwM2mRoot.java │ │ │ │ ├── LwM2mSingleResource.java │ │ │ │ ├── ObjectLink.java │ │ │ │ ├── PrefixedLwM2mPath.java │ │ │ │ ├── PrefixedLwM2mPathParser.java │ │ │ │ ├── TimestampedLwM2mNode.java │ │ │ │ ├── TimestampedLwM2mNodes.java │ │ │ │ └── codec │ │ │ │ │ ├── CodecException.java │ │ │ │ │ ├── DefaultLwM2mDecoder.java │ │ │ │ │ ├── DefaultLwM2mEncoder.java │ │ │ │ │ ├── LwM2mDecoder.java │ │ │ │ │ ├── LwM2mEncoder.java │ │ │ │ │ ├── LwM2mValueChecker.java │ │ │ │ │ ├── LwM2mValueConverter.java │ │ │ │ │ ├── MultiNodeDecoder.java │ │ │ │ │ ├── MultiNodeEncoder.java │ │ │ │ │ ├── NodeDecoder.java │ │ │ │ │ ├── NodeEncoder.java │ │ │ │ │ ├── PathDecoder.java │ │ │ │ │ ├── PathEncoder.java │ │ │ │ │ ├── TimestampedMultiNodeDecoder.java │ │ │ │ │ ├── TimestampedMultiNodeEncoder.java │ │ │ │ │ ├── TimestampedNodeDecoder.java │ │ │ │ │ ├── TimestampedNodeEncoder.java │ │ │ │ │ ├── cbor │ │ │ │ │ ├── LwM2mNodeCborDecoder.java │ │ │ │ │ └── LwM2mNodeCborEncoder.java │ │ │ │ │ ├── json │ │ │ │ │ ├── LwM2mNodeJsonDecoder.java │ │ │ │ │ └── LwM2mNodeJsonEncoder.java │ │ │ │ │ ├── opaque │ │ │ │ │ ├── LwM2mNodeOpaqueDecoder.java │ │ │ │ │ └── LwM2mNodeOpaqueEncoder.java │ │ │ │ │ ├── senml │ │ │ │ │ ├── LwM2mNodeSenMLDecoder.java │ │ │ │ │ ├── LwM2mNodeSenMLEncoder.java │ │ │ │ │ ├── LwM2mPathSenMLDecoder.java │ │ │ │ │ ├── LwM2mPathSenMLEncoder.java │ │ │ │ │ ├── LwM2mResolvedSenMLRecord.java │ │ │ │ │ └── LwM2mSenMLResolver.java │ │ │ │ │ ├── text │ │ │ │ │ ├── LwM2mNodeTextDecoder.java │ │ │ │ │ └── LwM2mNodeTextEncoder.java │ │ │ │ │ └── tlv │ │ │ │ │ ├── LwM2mNodeTlvDecoder.java │ │ │ │ │ └── LwM2mNodeTlvEncoder.java │ │ │ ├── observation │ │ │ │ ├── CompositeObservation.java │ │ │ │ ├── Observation.java │ │ │ │ ├── ObservationIdentifier.java │ │ │ │ └── SingleObservation.java │ │ │ ├── oscore │ │ │ │ ├── AeadAlgorithm.java │ │ │ │ ├── HkdfAlgorithm.java │ │ │ │ ├── InvalidOscoreSettingException.java │ │ │ │ ├── OscoreSetting.java │ │ │ │ └── OscoreValidator.java │ │ │ ├── parser │ │ │ │ └── StringParser.java │ │ │ ├── peer │ │ │ │ ├── IpPeer.java │ │ │ │ ├── LwM2mIdentity.java │ │ │ │ ├── LwM2mPeer.java │ │ │ │ ├── OscoreIdentity.java │ │ │ │ ├── PskIdentity.java │ │ │ │ ├── RpkIdentity.java │ │ │ │ ├── SocketIdentity.java │ │ │ │ └── X509Identity.java │ │ │ ├── request │ │ │ │ ├── AbstractLwM2mRequest.java │ │ │ │ ├── AbstractSimpleDownlinkRequest.java │ │ │ │ ├── BindingMode.java │ │ │ │ ├── BootstrapDeleteRequest.java │ │ │ │ ├── BootstrapDiscoverRequest.java │ │ │ │ ├── BootstrapFinishRequest.java │ │ │ │ ├── BootstrapReadRequest.java │ │ │ │ ├── BootstrapRequest.java │ │ │ │ ├── BootstrapWriteRequest.java │ │ │ │ ├── CancelCompositeObservationRequest.java │ │ │ │ ├── CancelObservationRequest.java │ │ │ │ ├── CompositeDownlinkRequest.java │ │ │ │ ├── ContentFormat.java │ │ │ │ ├── CreateRequest.java │ │ │ │ ├── DeleteRequest.java │ │ │ │ ├── DeregisterRequest.java │ │ │ │ ├── DiscoverRequest.java │ │ │ │ ├── DownLinkRequestVisitorAdapter.java │ │ │ │ ├── DownlinkBootstrapRequest.java │ │ │ │ ├── DownlinkBootstrapRequestVisitor.java │ │ │ │ ├── DownlinkDeviceManagementRequest.java │ │ │ │ ├── DownlinkDeviceManagementRequestVisitor.java │ │ │ │ ├── DownlinkRequest.java │ │ │ │ ├── DownlinkRequestVisitor.java │ │ │ │ ├── ExecuteRequest.java │ │ │ │ ├── LwM2mRequest.java │ │ │ │ ├── ObserveCompositeRequest.java │ │ │ │ ├── ObserveRequest.java │ │ │ │ ├── ReadCompositeRequest.java │ │ │ │ ├── ReadRequest.java │ │ │ │ ├── RegisterRequest.java │ │ │ │ ├── SendRequest.java │ │ │ │ ├── SimpleDownlinkRequest.java │ │ │ │ ├── UpdateRequest.java │ │ │ │ ├── UplinkBootstrapRequest.java │ │ │ │ ├── UplinkBootstrapRequestVisitor.java │ │ │ │ ├── UplinkDeviceManagementRequest.java │ │ │ │ ├── UplinkDeviceManagementRequestVisitor.java │ │ │ │ ├── UplinkRequest.java │ │ │ │ ├── UplinkRequestVisitor.java │ │ │ │ ├── WriteAttributesRequest.java │ │ │ │ ├── WriteCompositeRequest.java │ │ │ │ ├── WriteRequest.java │ │ │ │ ├── argument │ │ │ │ │ ├── Argument.java │ │ │ │ │ ├── Arguments.java │ │ │ │ │ └── InvalidArgumentException.java │ │ │ │ └── exception │ │ │ │ │ ├── ClientSleepingException.java │ │ │ │ │ ├── InvalidRequestException.java │ │ │ │ │ ├── InvalidResponseException.java │ │ │ │ │ ├── RequestCanceledException.java │ │ │ │ │ ├── RequestRejectedException.java │ │ │ │ │ ├── SendFailedException.java │ │ │ │ │ ├── TimeoutException.java │ │ │ │ │ └── UnconnectedPeerException.java │ │ │ ├── response │ │ │ │ ├── AbstractLwM2mResponse.java │ │ │ │ ├── BootstrapDeleteResponse.java │ │ │ │ ├── BootstrapDiscoverResponse.java │ │ │ │ ├── BootstrapFinishResponse.java │ │ │ │ ├── BootstrapReadResponse.java │ │ │ │ ├── BootstrapResponse.java │ │ │ │ ├── BootstrapWriteResponse.java │ │ │ │ ├── CancelCompositeObservationResponse.java │ │ │ │ ├── CancelObservationResponse.java │ │ │ │ ├── CreateResponse.java │ │ │ │ ├── DeleteResponse.java │ │ │ │ ├── DeregisterResponse.java │ │ │ │ ├── DiscoverResponse.java │ │ │ │ ├── ErrorCallback.java │ │ │ │ ├── ExecuteResponse.java │ │ │ │ ├── LwM2mResponse.java │ │ │ │ ├── ObserveCompositeResponse.java │ │ │ │ ├── ObserveResponse.java │ │ │ │ ├── ReadCompositeResponse.java │ │ │ │ ├── ReadResponse.java │ │ │ │ ├── RegisterResponse.java │ │ │ │ ├── ResponseCallback.java │ │ │ │ ├── SendResponse.java │ │ │ │ ├── SendableResponse.java │ │ │ │ ├── UpdateResponse.java │ │ │ │ ├── WriteAttributesResponse.java │ │ │ │ ├── WriteCompositeResponse.java │ │ │ │ └── WriteResponse.java │ │ │ ├── security │ │ │ │ ├── certificate │ │ │ │ │ ├── util │ │ │ │ │ │ ├── CertPathUtil.java │ │ │ │ │ │ ├── PKIValidator.java │ │ │ │ │ │ └── X509CertUtil.java │ │ │ │ │ └── verifier │ │ │ │ │ │ ├── BaseCertificateVerifier.java │ │ │ │ │ │ ├── CaConstraintCertificateVerifier.java │ │ │ │ │ │ ├── DefaultCertificateVerifier.java │ │ │ │ │ │ ├── DomainIssuerCertificateVerifier.java │ │ │ │ │ │ ├── ServiceCertificateConstraintCertificateVerifier.java │ │ │ │ │ │ ├── TrustAnchorAssertionCertificateVerifier.java │ │ │ │ │ │ └── X509CertificateVerifier.java │ │ │ │ ├── jsse │ │ │ │ │ └── LwM2mX509TrustManager.java │ │ │ │ └── util │ │ │ │ │ └── SecurityUtil.java │ │ │ ├── tlv │ │ │ │ ├── Tlv.java │ │ │ │ ├── TlvDecoder.java │ │ │ │ ├── TlvEncoder.java │ │ │ │ └── TlvException.java │ │ │ └── util │ │ │ │ ├── Hex.java │ │ │ │ ├── NamedThreadFactory.java │ │ │ │ ├── RandomStringUtils.java │ │ │ │ ├── StringUtils.java │ │ │ │ ├── TimestampUtil.java │ │ │ │ ├── Validate.java │ │ │ │ ├── base64 │ │ │ │ ├── Base64Decoder.java │ │ │ │ ├── Base64Encoder.java │ │ │ │ ├── DefaultBase64Decoder.java │ │ │ │ ├── DefaultBase64Encoder.java │ │ │ │ └── InvalidBase64Exception.java │ │ │ │ ├── datatype │ │ │ │ ├── LwM2mValueUtil.java │ │ │ │ ├── NumberUtil.java │ │ │ │ └── ULong.java │ │ │ │ └── json │ │ │ │ ├── JacksonJsonSerDes.java │ │ │ │ └── JsonException.java │ │ │ └── senml │ │ │ ├── ResolvedSenMLRecord.java │ │ │ ├── SenMLDecoder.java │ │ │ ├── SenMLEncoder.java │ │ │ ├── SenMLException.java │ │ │ ├── SenMLPack.java │ │ │ ├── SenMLRecord.java │ │ │ ├── SenMLResolver.java │ │ │ ├── cbor │ │ │ └── upokecenter │ │ │ │ ├── SenMLCborPackSerDes.java │ │ │ │ └── SenMLCborUpokecenterEncoderDecoder.java │ │ │ └── json │ │ │ └── jackson │ │ │ ├── SenMLJsonJacksonEncoderDecoder.java │ │ │ └── SenMLJsonRecordSerDes.java │ └── resources │ │ ├── models │ │ ├── 0-1_0.xml │ │ ├── 0-1_1.xml │ │ ├── 0.xml │ │ ├── 1-1_0.xml │ │ ├── 1-1_1.xml │ │ ├── 2-1_0.xml │ │ ├── 2.xml │ │ ├── 21.xml │ │ ├── 3-1_0.xml │ │ ├── 3-1_1.xml │ │ ├── 3.xml │ │ ├── 4-1_0.xml │ │ ├── 4-1_1.xml │ │ ├── 4-1_2.xml │ │ ├── 4.xml │ │ ├── 5-1_0.xml │ │ ├── 5.xml │ │ ├── 6.xml │ │ └── 7.xml │ │ └── schemas │ │ ├── LWM2M-v1_1.xsd │ │ └── LWM2M.xsd │ └── test │ ├── java │ └── org │ │ └── eclipse │ │ └── leshan │ │ ├── core │ │ ├── LwM2mTest.java │ │ ├── ResponseCodeTest.java │ │ ├── datatype │ │ │ └── NumberUtilTest.java │ │ ├── endpoint │ │ │ ├── DefaultEndPointUriParserTest.java │ │ │ ├── EndpointUriTest.java │ │ │ └── ProtocolTest.java │ │ ├── json │ │ │ ├── JsonArrayEntryTest.java │ │ │ ├── JsonDeserializerTest.java │ │ │ ├── JsonRootObjectTest.java │ │ │ └── JsonSerializerTest.java │ │ ├── link │ │ │ ├── DefaultLinkParserTest.java │ │ │ ├── DefaultLinkSerializerTest.java │ │ │ ├── LinkParserValidationTest.java │ │ │ ├── LinkTest.java │ │ │ ├── MixedLwM2mLinkTest.java │ │ │ ├── attributes │ │ │ │ ├── AttributeSetTest.java │ │ │ │ ├── AttributeTest.java │ │ │ │ ├── BaseAttributeTest.java │ │ │ │ └── ValuelessAttributeTest.java │ │ │ └── lwm2m │ │ │ │ ├── DefaultLwM2mLinkParserTest.java │ │ │ │ └── attributes │ │ │ │ ├── DefaultLwM2mAttributeParserTest.java │ │ │ │ ├── LwM2mAttributeTest.java │ │ │ │ └── LwM2mAttributesTest.java │ │ ├── model │ │ │ ├── DDFFileParserTest.java │ │ │ ├── LwM2mModelRepositoryTest.java │ │ │ ├── LwM2mModelRespositotyTest.java │ │ │ └── ValidateModelsTest.java │ │ ├── node │ │ │ ├── LwM2MResourceTest.java │ │ │ ├── LwM2mMultipleResourceTest.java │ │ │ ├── LwM2mNodeUtilTest.java │ │ │ ├── LwM2mObjectInstanceTest.java │ │ │ ├── LwM2mObjectTest.java │ │ │ ├── LwM2mPathTest.java │ │ │ ├── LwM2mResourceInstanceTest.java │ │ │ ├── LwM2mRootTest.java │ │ │ ├── LwM2mSingleResourceTest.java │ │ │ ├── ObjectLinkTest.java │ │ │ ├── PrefixedLwM2mPathTest.java │ │ │ ├── TimestampedLwM2mNodeTest.java │ │ │ ├── TimestampedLwM2mNodesTest.java │ │ │ └── codec │ │ │ │ ├── LwM2mNodeDecoderEncoderTest.java │ │ │ │ ├── LwM2mNodeDecoderTest.java │ │ │ │ └── LwM2mNodeEncoderTest.java │ │ ├── observation │ │ │ ├── CompositeObservationTest.java │ │ │ ├── ObservationIdentifierTest.java │ │ │ └── SingleObservationTest.java │ │ ├── oscore │ │ │ ├── AeadAlgorithmTest.java │ │ │ └── OscoreSettingTest.java │ │ ├── peer │ │ │ ├── IpPeerTest.java │ │ │ ├── OscoreIdentityTest.java │ │ │ ├── PskIdentityTest.java │ │ │ ├── RpkIdentityTest.java │ │ │ ├── SocketIdentityTest.java │ │ │ └── X509IdentityTest.java │ │ ├── request │ │ │ ├── AbstractSimpleDownlinkRequestTest.java │ │ │ ├── BootstrapReadRequestTest.java │ │ │ ├── BootstrapRequestTest.java │ │ │ ├── CancelObservationRequestTest.java │ │ │ ├── ContentFormatTest.java │ │ │ ├── CreateRequestTest.java │ │ │ ├── DeregisterRequestTest.java │ │ │ ├── ExecuteRequestTest.java │ │ │ ├── ObserveCompositeRequestTest.java │ │ │ ├── ObserveRequestTest.java │ │ │ ├── ReadCompositeRequestTest.java │ │ │ ├── ReadRequestTest.java │ │ │ ├── RegisterRequestTest.java │ │ │ ├── SendRequestTest.java │ │ │ ├── UpdateRequestTest.java │ │ │ ├── WriteAttributesRequestTest.java │ │ │ ├── WriteRequestTest.java │ │ │ └── argument │ │ │ │ ├── ArgumentTest.java │ │ │ │ ├── ArgumentValidationTest.java │ │ │ │ ├── ArgumentaSerializingTest.java │ │ │ │ ├── ArgumentsParsingTest.java │ │ │ │ └── ArgumentsTest.java │ │ ├── response │ │ │ ├── CancelCompositeObservationResponseTest.java │ │ │ ├── ObserveCompositeResponseTest.java │ │ │ ├── ObserveResponseTest.java │ │ │ └── ReadCompositeResponseTest.java │ │ ├── security │ │ │ └── util │ │ │ │ └── X509CertUtilTest.java │ │ ├── senml │ │ │ └── cbor │ │ │ │ ├── AbstractSenMLTest.java │ │ │ │ ├── SenMLCborSerializerTest.java │ │ │ │ ├── SenMLJsonSerDesTest.java │ │ │ │ └── SenMLTestUtil.java │ │ ├── tlv │ │ │ ├── TlvDecoderTest.java │ │ │ ├── TlvEncoderTest.java │ │ │ └── TlvTest.java │ │ └── util │ │ │ ├── ContentFormatArgumentConverter.java │ │ │ ├── TestLwM2mId.java │ │ │ ├── TestObjectLoader.java │ │ │ ├── TestToolBox.java │ │ │ ├── TimestampUtilTest.java │ │ │ ├── base64 │ │ │ ├── DefaultBase64DecoderTest.java │ │ │ └── DefaultBase64EncoderTest.java │ │ │ └── datatype │ │ │ └── ULongTest.java │ │ └── senml │ │ ├── SenMLPackTest.java │ │ └── SenMLRecordTest.java │ └── resources │ └── models │ ├── 3441.xml │ ├── 3442.xml │ └── xxe_injection.xml ├── leshan-lwm2m-server-redis ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── server │ │ └── redis │ │ ├── JedisLock.java │ │ ├── RedisRegistrationStore.java │ │ ├── RedisSecurityStore.java │ │ ├── SingleInstanceJedisLock.java │ │ └── serialization │ │ ├── LwM2mIdentitySerDes.java │ │ ├── LwM2mPeerSerDes.java │ │ ├── ObservationSerDes.java │ │ ├── RegistrationSerDes.java │ │ └── SecurityInfoSerDes.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── server │ └── redis │ └── serialization │ ├── RegistrationSerDesTest.java │ └── SecurityInfoSerDesTest.java ├── leshan-lwm2m-server ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── server │ │ ├── LeshanServer.java │ │ ├── LeshanServerBuilder.java │ │ ├── endpoint │ │ ├── CompositeServerEndpointsProvider.java │ │ ├── DefaultCompositeServerEndpointsProvider.java │ │ ├── EffectiveEndpointUriProvider.java │ │ ├── LwM2mServerEndpoint.java │ │ ├── LwM2mServerEndpointsProvider.java │ │ └── ServerEndpointToolbox.java │ │ ├── model │ │ ├── LwM2mModelProvider.java │ │ ├── StandardModelProvider.java │ │ ├── StaticModelProvider.java │ │ └── VersionedModelProvider.java │ │ ├── observation │ │ ├── LwM2mNotificationReceiver.java │ │ ├── ObservationListener.java │ │ ├── ObservationService.java │ │ └── ObservationServiceImpl.java │ │ ├── profile │ │ ├── ClientProfile.java │ │ ├── ClientProfileProvider.java │ │ └── DefaultClientProfileProvider.java │ │ ├── queue │ │ ├── ClientAwakeTimeProvider.java │ │ ├── PresenceListener.java │ │ ├── PresenceService.java │ │ ├── PresenceServiceImpl.java │ │ ├── PresenceStateListener.java │ │ ├── QueueModeLwM2mRequestSender.java │ │ └── StaticClientAwakeTimeProvider.java │ │ ├── registration │ │ ├── DefaultRegistrationDataExtractor.java │ │ ├── Deregistration.java │ │ ├── ExpirationListener.java │ │ ├── InMemoryRegistrationStore.java │ │ ├── RandomStringRegistrationIdProvider.java │ │ ├── Registration.java │ │ ├── RegistrationDataExtractor.java │ │ ├── RegistrationHandler.java │ │ ├── RegistrationIdProvider.java │ │ ├── RegistrationListener.java │ │ ├── RegistrationService.java │ │ ├── RegistrationServiceImpl.java │ │ ├── RegistrationStore.java │ │ ├── RegistrationUpdate.java │ │ └── UpdatedRegistration.java │ │ ├── request │ │ ├── DefaultDownlinkRequestSender.java │ │ ├── DefaultUplinkRequestReceiver.java │ │ ├── DownlinkRequestSender.java │ │ ├── LowerLayerConfig.java │ │ └── UplinkDeviceManagementRequestReceiver.java │ │ ├── security │ │ ├── Authorizer.java │ │ └── DefaultAuthorizer.java │ │ └── send │ │ ├── SendHandler.java │ │ ├── SendListener.java │ │ └── SendService.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── server │ ├── SerializationTests.java │ ├── SerializationUtil.java │ ├── queue │ └── PresenceServiceTest.java │ └── registration │ ├── InMemoryRegistrationStoreTest.java │ ├── RegistrationHandlerTest.java │ ├── RegistrationSortObjectLinksTest.java │ ├── RegistrationTest.java │ └── RegistrationUpdateTest.java ├── leshan-lwm2m-servers-shared ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── servers │ │ ├── DefaultServerEndpointNameProvider.java │ │ ├── ServerEndpointNameProvider.java │ │ └── security │ │ ├── Authorization.java │ │ ├── EditableSecurityStore.java │ │ ├── FileSecurityStore.java │ │ ├── InMemorySecurityStore.java │ │ ├── NonUniqueSecurityInfoException.java │ │ ├── SecurityChecker.java │ │ ├── SecurityInfo.java │ │ ├── SecurityStore.java │ │ ├── SecurityStoreListener.java │ │ └── ServerSecurityInfo.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── servers │ └── security │ └── SecurityInfoTest.java ├── leshan-tl-cf-bsserver-coap-oscore ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── bsserver │ ├── BootstrapOscoreContextCleaner.java │ ├── LwM2mBootstrapOscoreStore.java │ ├── OscoreBootstrapListener.java │ └── endpoint │ └── coap │ └── CoapOscoreBootstrapServerEndpointFactory.java ├── leshan-tl-cf-bsserver-coap ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── transport │ │ └── californium │ │ └── bsserver │ │ ├── BootstrapResource.java │ │ ├── ConnectionCleaner.java │ │ ├── LwM2mBootstrapPskStore.java │ │ ├── RootResource.java │ │ ├── endpoint │ │ ├── AbstractEndpointFactoryBuilder.java │ │ ├── BootstrapServerCoapMessageTranslator.java │ │ ├── BootstrapServerProtocolProvider.java │ │ ├── CaliforniumBootstrapServerEndpoint.java │ │ ├── CaliforniumBootstrapServerEndpointFactory.java │ │ ├── CaliforniumBootstrapServerEndpointsProvider.java │ │ ├── coap │ │ │ ├── CoapBootstrapServerEndpointFactory.java │ │ │ ├── CoapBootstrapServerEndpointFactoryBuilder.java │ │ │ └── CoapBootstrapServerProtocolProvider.java │ │ └── coaps │ │ │ ├── CoapsBootstrapServerEndpointFactory.java │ │ │ ├── CoapsBootstrapServerEndpointFactoryBuilder.java │ │ │ └── CoapsBootstrapServerProtocolProvider.java │ │ └── request │ │ ├── CoapRequestBuilder.java │ │ └── LwM2mResponseBuilder.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── bsserver │ ├── LeshanBootstrapServerBuilderTest.java │ └── LeshanBootstrapServerTest.java ├── leshan-tl-cf-client-coap-oscore ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── client │ └── endpoint │ └── coap │ ├── CoapOscoreClientEndpointFactory.java │ └── CoapOscoreProtocolProvider.java ├── leshan-tl-cf-client-coap ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── client │ ├── CaliforniumConnectionController.java │ ├── LwM2mClientCoapResource.java │ ├── ObserveCompositeRelationFilter.java │ ├── RootResource.java │ ├── bootstrap │ └── BootstrapResource.java │ ├── endpoint │ ├── CaliforniumClientEndpoint.java │ ├── CaliforniumClientEndpointFactory.java │ ├── CaliforniumClientEndpointsProvider.java │ ├── ClientCoapMessageTranslator.java │ ├── ClientProtocolProvider.java │ ├── ServerIdentityExtractor.java │ ├── coap │ │ ├── CoapClientEndpointFactory.java │ │ └── CoapClientProtocolProvider.java │ └── coaps │ │ ├── CoapsClientEndpointFactory.java │ │ └── CoapsClientProtocolProvider.java │ ├── object │ ├── InstanceRemovedFilter.java │ ├── ObjectResource.java │ └── ResourceObserveFilter.java │ └── request │ ├── CoapRequestBuilder.java │ └── LwM2mResponseBuilder.java ├── leshan-tl-cf-server-coap-oscore ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── server │ ├── LwM2mOscoreStore.java │ ├── OscoreContextCleaner.java │ └── endpoint │ └── coap │ └── CoapOscoreServerEndpointFactory.java ├── leshan-tl-cf-server-coap ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── transport │ │ └── californium │ │ └── server │ │ ├── ConnectionCleaner.java │ │ ├── LwM2mPskStore.java │ │ ├── RootResource.java │ │ ├── endpoint │ │ ├── AbstractEndpointFactoryBuilder.java │ │ ├── CaliforniumServerEndpoint.java │ │ ├── CaliforniumServerEndpointFactory.java │ │ ├── CaliforniumServerEndpointsProvider.java │ │ ├── ServerCoapMessageTranslator.java │ │ ├── ServerProtocolProvider.java │ │ ├── coap │ │ │ ├── CoapServerEndpointFactory.java │ │ │ ├── CoapServerEndpointFactoryBuilder.java │ │ │ └── CoapServerProtocolProvider.java │ │ └── coaps │ │ │ ├── CoapsServerEndpointFactory.java │ │ │ ├── CoapsServerEndpointFactoryBuilder.java │ │ │ └── CoapsServerProtocolProvider.java │ │ ├── observation │ │ ├── EndpointContextSerDes.java │ │ ├── LwM2mObservationStore.java │ │ └── ObservationSerDes.java │ │ ├── registration │ │ └── RegisterResource.java │ │ ├── request │ │ ├── CoapRequestBuilder.java │ │ ├── CoapRequestSetter.java │ │ └── LwM2mResponseBuilder.java │ │ └── send │ │ └── SendResource.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── server │ ├── DummyDecoder.java │ ├── LeshanServerBuilderTest.java │ ├── LeshanServerTest.java │ ├── observation │ ├── LwM2mObservationStoreTest.java │ ├── ObservationServiceTest.java │ └── ObserveUtilTest.java │ └── request │ ├── CoapRequestBuilderTest.java │ └── LwM2mResponseBuilderTest.java ├── leshan-tl-cf-shared-oscore ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── transport │ │ └── californium │ │ └── oscore │ │ └── cf │ │ ├── InMemoryOscoreContextDB.java │ │ ├── OscoreParameters.java │ │ ├── OscoreStore.java │ │ └── StaticOscoreStore.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── oscore │ └── cf │ └── OscoreParametersTest.java ├── leshan-tl-cf-shared ├── logback-leshan-test.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── transport │ │ └── californium │ │ ├── AbstractRequestObserver.java │ │ ├── AsyncRequestObserver.java │ │ ├── CoapAsyncRequestObserver.java │ │ ├── CoapResponseCallback.java │ │ ├── CoapSyncRequestObserver.java │ │ ├── DefaultCoapsExceptionTranslator.java │ │ ├── DefaultExceptionTranslator.java │ │ ├── ExceptionTranslator.java │ │ ├── LwM2mCoapResource.java │ │ ├── Lwm2mEndpointContextMatcher.java │ │ ├── ObserveUtil.java │ │ ├── PrincipalMdcConnectionListener.java │ │ ├── ResponseCodeUtil.java │ │ ├── SyncRequestObserver.java │ │ ├── identity │ │ ├── DefaultCoapIdentityHandler.java │ │ ├── DefaultCoapsIdentityHandler.java │ │ ├── IdentityHandler.java │ │ └── IdentityHandlerProvider.java │ │ └── security │ │ └── LwM2mCertificateVerifier.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── californium │ └── ResponseCodeUtilTest.java ├── leshan-tl-jc-client-coap ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── eclipse │ │ └── leshan │ │ └── transport │ │ └── javacoap │ │ └── client │ │ ├── endpoint │ │ ├── AbstractJavaCoapClientEndpointsProvider.java │ │ ├── JavaCoapClientEndpoint.java │ │ └── JavaCoapClientEndpointsProvider.java │ │ ├── observe │ │ ├── HashMapObserversStore.java │ │ ├── LwM2mKeys.java │ │ ├── NotificationHandler.java │ │ ├── ObserversListener.java │ │ ├── ObserversManager.java │ │ └── ObserversStore.java │ │ ├── request │ │ ├── ClientCoapMessageTranslator.java │ │ ├── CoapRequestBuilder.java │ │ └── LwM2mResponseBuilder.java │ │ └── resource │ │ ├── BootstrapResource.java │ │ ├── LwM2mClientCoapResource.java │ │ ├── ObjectResource.java │ │ ├── RootResource.java │ │ ├── RouterService.java │ │ └── ServerIdentityExtractor.java │ └── test │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── javacoap │ └── client │ ├── observe │ └── HashMapObserversStoreTest.java │ └── resource │ └── RouterServiceTest.java ├── leshan-tl-jc-client-coaptcp ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── javacoap │ └── client │ └── coaptcp │ └── endpoint │ ├── JavaCoapTcpClientEndpointsProvider.java │ ├── JavaCoapsTcpClientEndpointsProvider.java │ └── SSLSocketClientTransport.java ├── leshan-tl-jc-server-coap ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── javacoap │ └── server │ ├── endpoint │ ├── AbstractJavaCoapServerEndpointsProvider.java │ ├── JavaCoapServerEndpoint.java │ ├── JavaCoapServerEndpointsProvider.java │ └── ServerCoapMessageTranslator.java │ ├── observation │ ├── CoapNotificationReceiver.java │ ├── LwM2mKeys.java │ ├── LwM2mObservationsStore.java │ └── ObservationUtil.java │ ├── request │ ├── CoapRequestBuilder.java │ └── LwM2mResponseBuilder.java │ └── resource │ ├── RegistrationResource.java │ └── SendResource.java ├── leshan-tl-jc-server-coaptcp ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── javacoap │ └── server │ └── coaptcp │ ├── endpoint │ ├── JavaCoapTcpServerEndpointsProvider.java │ ├── JavaCoapsTcpServerEndpointsProvider.java │ └── LwM2mTransportContextMatcher.java │ └── transport │ ├── CoapTcpDecoder.java │ ├── CoapTcpEncoder.java │ ├── CoapTcpTransportResolver.java │ ├── CoapsTcpTransportResolver.java │ ├── DefaultTransportContextMatcher.java │ ├── NettyCoapTcpTransport.java │ ├── NettyUtils.java │ ├── TransportContextHandler.java │ └── UnconnectedPeerException.java ├── leshan-tl-jc-shared ├── logback-leshan-test.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── leshan │ └── transport │ └── javacoap │ ├── SingleX509KeyManager.java │ ├── State.java │ ├── identity │ ├── DefaultCoapIdentityHandler.java │ ├── DefaultTlsIdentityHandler.java │ ├── IdentityHandler.java │ ├── IdentityHandlerProvider.java │ └── TlsTransportContextKeys.java │ ├── request │ ├── RandomTokenGenerator.java │ └── ResponseCodeUtil.java │ └── resource │ └── LwM2mCoapResource.java ├── leshan.svg ├── notice.html └── pom.xml /.github/ISSUE_TEMPLATE/1_question.yml: -------------------------------------------------------------------------------- 1 | name: Question ? 2 | description: Ask a question, start a discussion , share an idea or need help ? 3 | labels: ["question"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before to ask a question : 9 | - Try to search if question is not already answered in [previous issue](https://github.com/eclipse/leshan/issues). 10 | - Look at the [F.A.Q.](https://github.com/eclipse/leshan/wiki/F.A.Q.). 11 | - Look at the [documentation](https://github.com/eclipse/leshan/wiki). 12 | 13 | - type: textarea 14 | id: question 15 | attributes: 16 | label: "Question" 17 | description: | 18 | (Please do not use screenshot to share textual information) 19 | validations: 20 | required: true 21 | 22 | - type: markdown 23 | attributes: 24 | value: | 25 | If you're using Leshan [let us know](https://github.com/eclipse/leshan/issues/830) and/or star the project ⭐. 26 | -------------------------------------------------------------------------------- /.github/actions/androidcheck/action.yml: -------------------------------------------------------------------------------- 1 | name: "Android Check" 2 | description: "Check compliance with android API" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check Android API 14 | id: main 15 | shell: bash 16 | run: mvn -B animal-sniffer:check 17 | 18 | 19 | # Store Step status in Build Status Properties file 20 | - name: Store Step Status 21 | if: always() 22 | # unstrusted action use commit ID instead of version 23 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 24 | with: 25 | file_path: ${{inputs.build_status_filename}} 26 | property: ${{github.action}} 27 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/androidcheck/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Android API Compliance Check failed !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just check Android API Compliance with : 8 | ``` 9 | mvn animal-sniffer:check 10 | ``` 11 | [More details](https://github.com/eclipse/leshan/wiki/F.A.Q.#can-i-use-leshan-with-android-) about this check -------------------------------------------------------------------------------- /.github/actions/build/action.yml: -------------------------------------------------------------------------------- 1 | name: "Build Code" 2 | description: "Build repository with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Build 14 | id: main 15 | shell: bash 16 | run: mvn -B install -PCompileOnly 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/build/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Maven Build failed !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` -------------------------------------------------------------------------------- /.github/actions/buildstatus/action.yml.txt: -------------------------------------------------------------------------------- 1 | This is not a real action but a kind of HACK, to easily add a global advice for all failing build. -------------------------------------------------------------------------------- /.github/actions/buildstatus/comment.txt: -------------------------------------------------------------------------------- 1 | :information_source: Some tips : 2 | - Once you fix your issues locally, **do not create a new PR**, see [how to refine your PR](https://github.com/eclipse/leshan/wiki/How-to-contribute#refine-it). 3 | - See [How to contribute](https://github.com/eclipse/leshan/wiki/How-to-contribute) guide and some [Code & design guidelines](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines). 4 | 5 | If documentation or those automatic comments are not clear enough, please [create a new issue](https://github.com/eclipse/leshan/issues/new) to discus about how to enhance it. 6 | -------------------------------------------------------------------------------- /.github/actions/checkstyle/action.yml: -------------------------------------------------------------------------------- 1 | name: "CheckSyle Validation" 2 | description: "Check some code style rules with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check Code Style 14 | id: main 15 | shell: bash 16 | run: mvn -B checkstyle:checkstyle 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/checkstyle/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Checkstyle Validation Failed !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just validate checkstyle rules with : 8 | ``` 9 | mvn checkstyle:checkstyle 10 | ``` 11 | See also [How configure your IDE](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines#configure-your-ide). 12 | -------------------------------------------------------------------------------- /.github/actions/formatter/action.yml: -------------------------------------------------------------------------------- 1 | name: "Check code Format" 2 | description: "Check code is well formatted with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check Code Format 14 | id: main 15 | shell: bash 16 | run: mvn -B formatter:validate 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/formatter/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Code is not well-formatted !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just validate code format with : 8 | ``` 9 | mvn formatter:validate 10 | ``` 11 | You can format the code with : 12 | ``` 13 | mvn formatter:format 14 | ``` 15 | See also [How configure your IDE](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines#configure-your-ide). 16 | -------------------------------------------------------------------------------- /.github/actions/integrationtests/action.yml: -------------------------------------------------------------------------------- 1 | name: "Integration Tests" 2 | description: "Run Integration Tests with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | - name: Run Integration Tests 13 | id: main 14 | shell: bash 15 | run: mvn -B surefire:test '-Dtest=org.eclipse.leshan.integration.tests.**,!**/Redis*.java' -Dsurefire.rerunFailingTestsCount=10 -Dsurefire.failIfNoSpecifiedTests=false 16 | 17 | # Store Step status in Build Status Properties file 18 | - name: Store Step Status 19 | if: always() 20 | # unstrusted action use commit ID instead of version 21 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 22 | with: 23 | file_path: ${{inputs.build_status_filename}} 24 | property: ${{github.action}} 25 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/integrationtests/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Integration Tests failed !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just launch all tests : 8 | ``` 9 | mvn surefire:test 10 | ``` 11 | To launch integration tests only : 12 | ``` 13 | mvn surefire:test '-Dtest=org.eclipse.leshan.integration.tests.**,!**/Redis*.java' -Dsurefire.failIfNoSpecifiedTests=false 14 | ``` 15 | Currently, some of our integration tests are flaky :unamused: ,so do not hesitate to re-run in case of failure. -------------------------------------------------------------------------------- /.github/actions/javadoc/action.yml: -------------------------------------------------------------------------------- 1 | name: "Generate Javadoc" 2 | description: "Generate Javadoc with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Generate Javadoc 14 | id: main 15 | shell: bash 16 | run: mvn -B javadoc:javadoc-no-fork 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/javadoc/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Javadoc Generation failed !** [(more details)](###_URL_###) 2 | 3 | Ensure you can generate javadoc locally using: 4 | ``` 5 | mvn javadoc:javadoc 6 | ``` -------------------------------------------------------------------------------- /.github/actions/nomerge/action.yml: -------------------------------------------------------------------------------- 1 | name: "Check No Merge commit" 2 | description: "Check PR does not contains any merge commit" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check For Merge Commit 14 | id: main 15 | uses: voxie-actions/no-merge-commits@v1.0.0 16 | 17 | # Store Step status in Build Status Properties file 18 | - name: Store Step Status 19 | if: always() 20 | # unstrusted action use commit ID instead of version 21 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 22 | with: 23 | file_path: ${{inputs.build_status_filename}} 24 | property: ${{github.action}} 25 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/nomerge/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **PR should not contain "Merge Commit"**, so please use `git rebase` instead. -------------------------------------------------------------------------------- /.github/actions/semvercheck/action.yml: -------------------------------------------------------------------------------- 1 | name: "Semantic Version Check" 2 | description: "Check API against Semantic versioning rules" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check API break 14 | id: main 15 | shell: bash 16 | run: mvn -B revapi:check 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/semvercheck/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **API break detected !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just check Semantic Versioning Compliance with : 8 | ``` 9 | mvn revapi:check 10 | ``` 11 | We are using revapi to ensure API break respect [Semantic Versioning rules](https://semver.org/). 12 | ``` -------------------------------------------------------------------------------- /.github/actions/sortimport/action.yml: -------------------------------------------------------------------------------- 1 | name: "Check Java Import" 2 | description: "Check Java Import are well sorted with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check Java Import 14 | id: main 15 | shell: bash 16 | run: mvn -B impsort:check 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} 27 | -------------------------------------------------------------------------------- /.github/actions/sortimport/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Java Import are not sorted !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just validate java import with : 8 | ``` 9 | mvn impsort:check 10 | ``` 11 | You can sort Java import with : 12 | ``` 13 | mvn impsort:sort 14 | ``` 15 | See also [How configure your IDE](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines#configure-your-ide). 16 | -------------------------------------------------------------------------------- /.github/actions/sortpom/action.yml: -------------------------------------------------------------------------------- 1 | name: "Check POM Formatting" 2 | description: "Check pom.xml file are well formatted with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Check POM formatting 14 | id: main 15 | shell: bash 16 | run: mvn -B com.github.ekryd.sortpom:sortpom-maven-plugin:verify -PallPom 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} 27 | -------------------------------------------------------------------------------- /.github/actions/sortpom/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Pom.xml files are not well formatted !** [(more details)](###_URL_###}) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just validate pom formatting with : 8 | ``` 9 | mvn com.github.ekryd.sortpom:sortpom-maven-plugin:verify -PallPom 10 | ``` 11 | You can format pom.xml file with : 12 | ``` 13 | mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -PallPom 14 | ``` -------------------------------------------------------------------------------- /.github/actions/unittests/action.yml: -------------------------------------------------------------------------------- 1 | name: "Unit Tests " 2 | description: "Run Unit Tests with Maven" 3 | 4 | inputs: 5 | build_status_filename: 6 | description: 'Path to build status properties file' 7 | required: true 8 | 9 | runs: 10 | using: "composite" 11 | steps: 12 | 13 | - name: Run Integration Tests 14 | id: main 15 | shell: bash 16 | run: mvn -B surefire:test '-Dtest=!org.eclipse.leshan.integration.tests.**' -Dsurefire.failIfNoSpecifiedTests=false -Dskip.npm 17 | 18 | # Store Step status in Build Status Properties file 19 | - name: Store Step Status 20 | if: always() 21 | # unstrusted action use commit ID instead of version 22 | uses: GuillaumeFalourd/write-java-properties-file@c6762204aa02d62718ed285bca4cbcc400c65a10 #v1 23 | with: 24 | file_path: ${{inputs.build_status_filename}} 25 | property: ${{github.action}} 26 | value: ${{steps.main.outcome}} -------------------------------------------------------------------------------- /.github/actions/unittests/comment.txt: -------------------------------------------------------------------------------- 1 | :x: **Unit Tests failed !** [(more details)](###_URL_###) 2 | 3 | Ensure your code build locally using: 4 | ``` 5 | mvn clean install 6 | ``` 7 | Or just launch tests : 8 | ``` 9 | mvn surefire:test 10 | ``` 11 | To launch unit tests only : 12 | ``` 13 | mvn surefire:test '-Dtest=!org.eclipse.leshan.integration.tests.**' -Dsurefire.failIfNoSpecifiedTests=false -Dskip.npm 14 | ``` -------------------------------------------------------------------------------- /.github/images/Leshan_social_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/.github/images/Leshan_social_preview.png -------------------------------------------------------------------------------- /.github/images/Leshan_social_preview.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/.github/images/Leshan_social_preview.xcf -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # PLEASE TAKE TIME TO READ THIS # 2 | 3 | (Click on `Preview` ☝ to read this more comfortably) 4 | 5 | ## Before To create a PR 6 | 7 | Maybe better to discuss with the team about the change you want to contribute first by [creating a new issue](https://github.com/eclipse/leshan/issues/new). 8 | 9 | ## Ready to create the PR 10 | 11 | Take a look at [Contribution Guide](https://github.com/eclipse/leshan/wiki/How-to-contribute#how-to-contribute-code). 12 | 13 | ## PR Description 14 | 15 | Please include a summary of the change in the PR description. 16 | Also, refer corresponding issue if it exists. 17 | 18 | ## Your PR is not validated :x: 19 | 20 | **DO NOT CREATE A NEW PR**, just fix the current one, See [How to Refine your PR](https://github.com/eclipse/leshan/wiki/How-to-contribute#refine-it). 21 | 22 | If you didn't succeed alone, ask for help before to close your PR and create a new one for same issue. 23 | -------------------------------------------------------------------------------- /.github/workflows/delete_workflow.yml: -------------------------------------------------------------------------------- 1 | name: Delete old workflow runs 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '0 0 1 * *' 6 | # Run monthly, at 00:00 on the 1st day of month. 7 | 8 | permissions: read-all 9 | 10 | jobs: 11 | del_runs: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | actions: write 15 | steps: 16 | - name: Delete workflow runs 17 | uses: Mattraks/delete-workflow-runs@c1a2f0de3fa4134a2357de83c92acff6e298bb8a 18 | with: 19 | token: ${{ github.token }} 20 | repository: ${{ github.repository }} 21 | retain_days: 30 22 | keep_minimum_runs: 6 -------------------------------------------------------------------------------- /.github/workflows/dependency-update.yml: -------------------------------------------------------------------------------- 1 | # This jobs aims to add transitive dependency to dependabot analysis 2 | # See for more details : https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/3640 3 | name: Dependency Update 4 | 5 | on: 6 | push: 7 | branches: 8 | - 'master' 9 | workflow_dispatch: 10 | 11 | permissions: read-all 12 | 13 | jobs: 14 | dependency: 15 | # don't run this workflow in forks 16 | if: github.repository == 'eclipse-leshan/leshan' 17 | runs-on: ubuntu-latest 18 | permissions: 19 | contents: write 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 23 | - name: Submit Dependency Snapshot 24 | uses: advanced-security/maven-dependency-submission-action@fcd7eab6b6d22946badc98d1e62665cdee93e0ae # v3.0.3 -------------------------------------------------------------------------------- /.github/workflows/scorecard-analysis.yml: -------------------------------------------------------------------------------- 1 | name: Scorecard analysis workflow 2 | on: 3 | push: 4 | branches: 5 | # update to the default branch if it differs 6 | - master 7 | schedule: 8 | # Weekly on Saturdays. 9 | - cron: '30 1 * * 6' 10 | 11 | concurrency: 12 | group: ${{ github.workflow }}-${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | permissions: read-all 16 | 17 | jobs: 18 | analysis: 19 | if: github.repository_owner == 'eclipse-leshan' 20 | name: Scorecard analysis 21 | runs-on: ubuntu-latest 22 | permissions: 23 | security-events: write 24 | id-token: write 25 | 26 | steps: 27 | - name: "Checkout code" 28 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 29 | with: 30 | persist-credentials: false 31 | 32 | - name: "Run analysis" 33 | uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 34 | with: 35 | results_file: results.sarif 36 | results_format: sarif 37 | publish_results: true 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Leshan config files # 2 | leshan-lwm2m-core/ddffiles 3 | **/Californium.properties 4 | **/Californium3.properties 5 | **/Californium3.bsserver.properties 6 | **/Californium3.server.properties 7 | **/Californium3.client.properties 8 | **/data/*.data 9 | **/data/*.json 10 | 11 | # Binary files # 12 | *.class 13 | 14 | # Maven build files # 15 | target 16 | 17 | # Eclipse files # 18 | bin/ 19 | .classpath 20 | .project 21 | .settings 22 | 23 | # IntelliJ Config Files # 24 | .idea/ 25 | *.iml 26 | 27 | # Visual Studio Code files # 28 | .vscode/ 29 | 30 | # Package Files # 31 | *.jar 32 | *.war 33 | *.ear 34 | 35 | # log Files # 36 | **/src/main/**/logback*.xml 37 | **/src/test/**/logback*.xml 38 | 39 | # Credentials files # 40 | **/*.der 41 | **/*.pem 42 | **/*.srl 43 | !**/src/**/*.der 44 | !**/certificates/*.pem 45 | -------------------------------------------------------------------------------- /.trivyignore: -------------------------------------------------------------------------------- 1 | # ========================= 2 | # About Servers Demos 3 | # ========================= 4 | 5 | # Frontend 6 | # ------------ 7 | # We need to wait for : https://github.com/CycloneDX/cyclonedx-javascript-library/issues/1079 8 | CVE-2024-34394 9 | CVE-2024-34393 10 | 11 | # ========================= 12 | # About Leshan Libraries 13 | # ========================= 14 | # Nothing for now. 15 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Guide to contributing 2 | 3 | If you plan to contribute to Leshan please take few minutes to read our [Contribution Guide](https://github.com/eclipse/leshan/wiki/How-to-contribute). 4 | 5 | If you are comfortable with **java**, **maven**, **git** and **github PR flow**, you can just read the [legal stuff](https://github.com/eclipse/leshan/wiki/How-to-contribute#legal-stuff-) and our [code&design guidelines](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines). 6 | 7 | Thanks a lot ! -------------------------------------------------------------------------------- /build-config/demo-build-config/jar-with-dependencies-with-logback.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | jar-with-dependencies 6 | 7 | jar 8 | 9 | false 10 | 11 | 12 | logback-config.xml 13 | logback.xml 14 | 15 | 16 | 17 | 18 | / 19 | true 20 | true 21 | runtime 22 | 23 | 24 | -------------------------------------------------------------------------------- /documentation/Requirement.md: -------------------------------------------------------------------------------- 1 | # Minimal Requirement for Leshan. 2 | 3 | ## Leshan 2.x 4 | 5 | | Component | Minimal Requirement | 6 | | - | - | 7 | | Maven Build | Maven 3.6.0
Java 17| 8 | | Leshan library | Java 8 | 9 | | Leshan client demo | Java 8 | 10 | | Leshan server demo | Java 17 (because of [jetty 12](https://jetty.org/docs/jetty/12/index.html) dependency) | 11 | | Leshan bsserver demo | Java 17 (because of [jetty 12](https://jetty.org/docs/jetty/12/index.html) dependency) | 12 | 13 | ## Leshan 1.x 14 | see [Leshan 1.x documentation](https://github.com/eclipse-leshan/leshan/tree/1.x/documentation/Requirement.md). -------------------------------------------------------------------------------- /eclipse/java.header: -------------------------------------------------------------------------------- 1 | ^/\*+$ 2 | ^ \* Copyright \(c\) \d\d\d\d(-\d\d\d\d)? .+\.$ 3 | ^ \*$ 4 | ^ \* All rights reserved\. This program and the accompanying materials$ 5 | ^ \* are made available under the terms of the Eclipse Public License v2\.0$ 6 | ^ \* and Eclipse Distribution License v1\.0 which accompany this distribution\.$ 7 | ^ \*$ 8 | ^ \* The Eclipse Public License is available at$ 9 | ^ \* http://www\.eclipse\.org/legal/epl-v20\.html$ 10 | ^ \* and the Eclipse Distribution License is available at$ 11 | ^ \* http://www\.eclipse\.org/org/documents/edl-v10\.html\.$ 12 | ^ \*$ 13 | ^ \* Contributors:$ 14 | ^ \* .+$ 15 | ^ \*+/$ -------------------------------------------------------------------------------- /eclipse/settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /eclipse/settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | line.separator=\n 3 | -------------------------------------------------------------------------------- /leshan-demo-bsserver/src/main/resources/credentials/server_cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-bsserver/src/main/resources/credentials/server_cert.der -------------------------------------------------------------------------------- /leshan-demo-bsserver/src/main/resources/credentials/server_privkey.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-bsserver/src/main/resources/credentials/server_privkey.der -------------------------------------------------------------------------------- /leshan-demo-bsserver/src/main/resources/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Leshan Bootstrap Server Demo 8 | 9 | 10 |

11 | If you are in development phase and run leshan-demo-bsserver 12 | from your ide, you probably missed to launch npm run 13 | serve and/or you are not using the right port 14 | to access to the demo, try http://localhost:8088/ 15 |
(see leshan-demo-bsserver 17 | README for more details)
18 |

19 |

20 | If you are using a built version of leshan-demo-bsserver 21 | and you see this page, you probably discover a leshan built issue. 22 | Please report it. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | node 4 | /dist 5 | 6 | 7 | # local env files 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/README.md: -------------------------------------------------------------------------------- 1 | # webapp 2 | 3 | The **leshan-demo-bsserver** webapp is based on [Vue.js](https://vuejs.org/). 4 | For more details you should refer to **leshan-demo-server** [README](https://github.com/eclipse/leshan/tree/master/leshan-demo-server/webapp/README.md). -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/eslint.config.js: -------------------------------------------------------------------------------- 1 | import vue from 'eslint-plugin-vue' 2 | import vuetify from 'eslint-plugin-vuetify' 3 | 4 | export default [ 5 | ...vue.configs['flat/essential'], 6 | ...vuetify.configs['flat/base'], 7 | ] -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | Leshan Bootstrap Server Demo 13 | 14 | 15 | 16 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"], 5 | "@leshan-demo-servers-shared/*": [ 6 | "../../leshan-demo-servers-shared/webapp/src/*" 7 | ] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /leshan-demo-bsserver/webapp/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-bsserver/webapp/public/favicon.png -------------------------------------------------------------------------------- /leshan-demo-server/.gitignore: -------------------------------------------------------------------------------- 1 | /ddffiles/ 2 | -------------------------------------------------------------------------------- /leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/servlet/log/CoapMessageListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.server.servlet.log; 17 | 18 | public interface CoapMessageListener { 19 | 20 | void trace(CoapMessage message); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /leshan-demo-server/src/main/resources/credentials/server_cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-server/src/main/resources/credentials/server_cert.der -------------------------------------------------------------------------------- /leshan-demo-server/src/main/resources/credentials/server_privkey.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-server/src/main/resources/credentials/server_privkey.der -------------------------------------------------------------------------------- /leshan-demo-server/src/main/resources/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Leshan Server Demo 8 | 9 | 10 |

11 | If you are in development phase and run leshan-demo-server 12 | from your ide, you probably missed to launch npm run 13 | serve and/or you are not using the right port 14 | to access to the demo, try http://localhost:8088/ 15 |
(see leshan-demo-server 17 | README for more details)
18 |

19 |

20 | If you are using a built version of leshan-demo-server 21 | and you see this page, you probably discover a leshan built issue. 22 | Please report it. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /leshan-demo-server/webapp/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | node 4 | /dist 5 | 6 | 7 | # local env files 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /leshan-demo-server/webapp/eslint.config.js: -------------------------------------------------------------------------------- 1 | import vue from 'eslint-plugin-vue' 2 | import vuetify from 'eslint-plugin-vuetify' 3 | 4 | export default [ 5 | ...vue.configs['flat/essential'], 6 | ...vuetify.configs['flat/base'], 7 | ] -------------------------------------------------------------------------------- /leshan-demo-server/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | Leshan Server Demo 13 | 14 | 15 | 16 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /leshan-demo-server/webapp/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"], 5 | "@leshan-demo-servers-shared/*": [ 6 | "../../leshan-demo-servers-shared/webapp/src/*" 7 | ] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /leshan-demo-server/webapp/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-server/webapp/public/favicon.png -------------------------------------------------------------------------------- /leshan-demo-servers-shared/src/main/java/org/eclipse/leshan/demo/servers/cli/converters/ServerCIDConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v2.0 5 | * and Eclipse Distribution License v1.0 which accompany this distribution. 6 | * 7 | * The Eclipse Public License is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * and the Eclipse Distribution License is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.html. 11 | * 12 | * Contributors: 13 | * Sierra Wireless - initial API and implementation 14 | *******************************************************************************/ 15 | package org.eclipse.leshan.demo.servers.cli.converters; 16 | 17 | import org.eclipse.leshan.demo.cli.converters.CIDConverter; 18 | 19 | public class ServerCIDConverter extends CIDConverter { 20 | public ServerCIDConverter() { 21 | super(6); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "*": ["../../leshan-demo-bsserver/webapp/node_modules/*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leshan-demo-servers-shared", 3 | "version": "0.1.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/assets/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-servers-shared/webapp/src/assets/image/logo.png -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/assets/image/multicolor-leshan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-demo-servers-shared/webapp/src/assets/image/multicolor-leshan.png -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/components/security/X509Input.vue: -------------------------------------------------------------------------------- 1 | 13 | 16 | -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/plugins/dayjs.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | *******************************************************************************/ 13 | import dayjs from "dayjs"; 14 | 15 | export default { 16 | install: (app) => { 17 | app.config.globalProperties.$date = dayjs; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/plugins/dialog.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | *******************************************************************************/ 13 | import { Vuetify3Dialog } from 'vuetify3-dialog' 14 | 15 | export default Vuetify3Dialog; -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/plugins/sse.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | *******************************************************************************/ 13 | 14 | import VueSSE from "vue-sse"; 15 | 16 | export default { 17 | install(app, config = {}) { 18 | const leshanDefaultConfig = { 19 | format: 'json', 20 | }; 21 | 22 | // Merge both config 23 | const finalConfig = { ...leshanDefaultConfig, ...config }; 24 | 25 | // Install plugin with given config 26 | app.use(VueSSE, finalConfig); 27 | } 28 | }; -------------------------------------------------------------------------------- /leshan-demo-servers-shared/webapp/src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | *******************************************************************************/ 13 | 14 | import "@fontsource/roboto"; 15 | import 'vuetify/styles' 16 | import { createVuetify } from 'vuetify' 17 | import { aliases, mdi } from 'vuetify/iconsets/mdi-svg' 18 | 19 | export default createVuetify({ 20 | theme: { 21 | defaultTheme: 'light', 22 | }, 23 | icons: { 24 | defaultSet: 'mdi', 25 | aliases, 26 | sets: { 27 | mdi, 28 | }, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/HexadecimalConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import org.eclipse.californium.elements.util.Bytes; 19 | import org.eclipse.leshan.core.util.Hex; 20 | 21 | import picocli.CommandLine.ITypeConverter; 22 | 23 | public class HexadecimalConverter implements ITypeConverter { 24 | 25 | @Override 26 | public Bytes convert(String value) throws Exception { 27 | return new Bytes(Hex.decodeHex(value.toCharArray())); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/LwM2mPathConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v2.0 5 | * and Eclipse Distribution License v1.0 which accompany this distribution. 6 | * 7 | * The Eclipse Public License is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * and the Eclipse Distribution License is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.html. 11 | * 12 | * Contributors: 13 | * Sierra Wireless - initial API and implementation 14 | *******************************************************************************/ 15 | package org.eclipse.leshan.demo.cli.converters; 16 | 17 | import org.eclipse.leshan.core.node.InvalidLwM2mPathException; 18 | import org.eclipse.leshan.core.node.LwM2mPath; 19 | 20 | import picocli.CommandLine.ITypeConverter; 21 | 22 | public class LwM2mPathConverter implements ITypeConverter { 23 | 24 | @Override 25 | public LwM2mPath convert(String value) throws InvalidLwM2mPathException { 26 | return new LwM2mPath(value); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/PrivateKeyConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import java.security.PrivateKey; 19 | 20 | import org.eclipse.leshan.core.security.util.SecurityUtil; 21 | 22 | import picocli.CommandLine.ITypeConverter; 23 | 24 | public class PrivateKeyConverter implements ITypeConverter { 25 | 26 | @Override 27 | public PrivateKey convert(String value) throws Exception { 28 | return SecurityUtil.privateKey.readFromFile(value); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/PublicKeyConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import java.security.PublicKey; 19 | 20 | import org.eclipse.leshan.core.security.util.SecurityUtil; 21 | 22 | import picocli.CommandLine.ITypeConverter; 23 | 24 | public class PublicKeyConverter implements ITypeConverter { 25 | 26 | @Override 27 | public PublicKey convert(String value) throws Exception { 28 | return SecurityUtil.publicKey.readFromFile(value); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/StringLwM2mPathConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import org.eclipse.leshan.core.node.LwM2mPath; 19 | 20 | import picocli.CommandLine.ITypeConverter; 21 | 22 | public class StringLwM2mPathConverter implements ITypeConverter { 23 | 24 | @Override 25 | public String convert(String value) throws Exception { 26 | // create a LwM2mPath to force validation. 27 | new LwM2mPath(value); 28 | return value; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/X509CertificateChainConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import java.security.cert.X509Certificate; 19 | 20 | import org.eclipse.leshan.core.security.util.SecurityUtil; 21 | 22 | import picocli.CommandLine.ITypeConverter; 23 | 24 | public class X509CertificateChainConverter implements ITypeConverter { 25 | 26 | @Override 27 | public X509Certificate[] convert(String value) throws Exception { 28 | return SecurityUtil.certificateChain.readFromFile(value); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/converters/X509CertificateConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.cli.converters; 17 | 18 | import java.security.cert.X509Certificate; 19 | 20 | import org.eclipse.leshan.core.security.util.SecurityUtil; 21 | 22 | import picocli.CommandLine.ITypeConverter; 23 | 24 | public class X509CertificateConverter implements ITypeConverter { 25 | 26 | @Override 27 | public X509Certificate convert(String value) throws Exception { 28 | return SecurityUtil.certificate.readFromFile(value); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/NoColorConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo.logback; 17 | 18 | import ch.qos.logback.core.pattern.CompositeConverter; 19 | 20 | public class NoColorConverter extends CompositeConverter { 21 | 22 | @Override 23 | protected String transform(E event, String in) { 24 | return in; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /leshan-demo-shared/src/main/resources/leshan.properties: -------------------------------------------------------------------------------- 1 | # value are set at build time, see pom.xml 2 | version=${project.version} 3 | commitid=${buildNumber} 4 | timestamp=${timestamp} -------------------------------------------------------------------------------- /leshan-demo-shared/src/test/java/org/eclipse/leshan/demo/ValidateDemoModelsTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.demo; 17 | 18 | import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; 19 | 20 | import org.eclipse.leshan.core.model.ObjectLoader; 21 | import org.junit.jupiter.api.Test; 22 | 23 | class ValidateDemoModelsTest { 24 | 25 | @Test 26 | void validate_embedded_models() { 27 | assertDoesNotThrow(() -> ObjectLoader.loadDdfResources("/models/", LwM2mDemoConstant.modelPaths, true)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /leshan-integration-tests/credentials/clientKeyStore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-integration-tests/credentials/clientKeyStore.jks -------------------------------------------------------------------------------- /leshan-integration-tests/credentials/serverKeyStore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-integration-tests/credentials/serverKeyStore.jks -------------------------------------------------------------------------------- /leshan-integration-tests/credentials/trustedCaKeyStore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-integration-tests/credentials/trustedCaKeyStore.jks -------------------------------------------------------------------------------- /leshan-integration-tests/credentials/unknownCaKeyStore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-integration-tests/credentials/unknownCaKeyStore.jks -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/RedisRegistrationTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisRegistrationTest extends RegistrationTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/observe/RedisDynamicIPObserveTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.observe; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisDynamicIPObserveTest extends DynamicIPObserveTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/observe/RedisObserveTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.observe; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisObserveTest extends ObserveTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/RedisPskTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.security; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisPskTest extends PskTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/RedisRpkTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.security; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisRpkTest extends RpkTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/RedisRpkX509Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.security; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisRpkX509Test extends RpkX509Test { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/RedisSecurityStoreTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.security; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisSecurityStoreTest extends SecurityStoreTest { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/RedisX509Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.integration.tests.security; 17 | 18 | import org.eclipse.leshan.core.endpoint.Protocol; 19 | import org.eclipse.leshan.integration.tests.util.LeshanTestServerBuilder; 20 | 21 | public class RedisX509Test extends X509Test { 22 | 23 | @Override 24 | protected LeshanTestServerBuilder givenServerUsing(Protocol givenProtocol) { 25 | return super.givenServerUsing(givenProtocol).withRedisRegistrationStore(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-bsserver/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-lwm2m-bsserver/src/main/java/org/eclipse/leshan/bsserver/BootstrapConfigStore.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.bsserver; 17 | 18 | /** 19 | * A store containing the bootstrap information to be sent to the clients. 20 | * 21 | */ 22 | public interface BootstrapConfigStore { 23 | 24 | /** 25 | * Get the bootstrap configuration to apply to the client which opened the given BootstrapSession. 26 | * 27 | * @param session the current {@link BootstrapSession}. 28 | * @return the {@link BootstrapConfig} to apply. 29 | */ 30 | BootstrapConfig get(BootstrapSession session); 31 | } 32 | -------------------------------------------------------------------------------- /leshan-lwm2m-bsserver/src/main/java/org/eclipse/leshan/bsserver/SmsSecurityMode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.bsserver; 17 | 18 | /** 19 | * The different SMS security modes 20 | */ 21 | public enum SmsSecurityMode { 22 | RESERVED(0), SPS_DEVICE(1), SPS_SMARTCARD(2), NO_SEC(3), PROPRIETARY(255); 23 | 24 | public final int code; 25 | 26 | private SmsSecurityMode(int code) { 27 | this.code = code; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-bsserver/src/main/java/org/eclipse/leshan/bsserver/model/StandardBootstrapModelProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.bsserver.model; 17 | 18 | import org.eclipse.leshan.core.model.ObjectLoader; 19 | 20 | /** 21 | * A versioned model provider which uses the default model embedded in Leshan. 22 | * 23 | * @see VersionedBootstrapModelProvider 24 | */ 25 | public class StandardBootstrapModelProvider extends VersionedBootstrapModelProvider { 26 | 27 | public StandardBootstrapModelProvider() { 28 | super(ObjectLoader.loadAllDefault()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-bsserver/src/test/java/org/eclipse/leshan/bsserver/InMemoryBootstrapConfigStoreTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.bsserver; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class InMemoryBootstrapConfigStoreTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(InMemoryBootstrapConfigStore.PskByServer.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/bootstrap/BootstrapListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.bootstrap; 17 | 18 | /** 19 | * Listen for bootstrap session event. 20 | */ 21 | public interface BootstrapListener { 22 | 23 | /** 24 | * Invoked when a bootstrap session is closed.
25 | * 26 | * Generally when we receive a bootstrap finished request or when the bootstrap session ends in an unexpected 27 | * way.(e.g. bootstrap server is not responding anymore) 28 | */ 29 | void bootstrapFinished(); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/NotificationSender.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.resource; 17 | 18 | import org.eclipse.leshan.core.response.ObserveResponse; 19 | 20 | public interface NotificationSender { 21 | /** 22 | * Send notification, return false if there is no more observe relation. 23 | */ 24 | boolean sendNotification(ObserveResponse response); 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/NotifySender.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.resource; 17 | 18 | public interface NotifySender { 19 | void sendNotify(String URI); 20 | } 21 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/listener/ObjectListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.resource.listener; 17 | 18 | import org.eclipse.leshan.client.resource.LwM2mObjectEnabler; 19 | 20 | public interface ObjectListener extends ResourceListener { 21 | 22 | void objectInstancesAdded(LwM2mObjectEnabler object, int... instanceIds); 23 | 24 | void objectInstancesRemoved(LwM2mObjectEnabler object, int... instanceIds); 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/listener/ObjectsListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.resource.listener; 17 | 18 | import org.eclipse.leshan.client.resource.LwM2mObjectEnabler; 19 | 20 | public interface ObjectsListener extends ObjectListener { 21 | 22 | void objectAdded(LwM2mObjectEnabler object); 23 | 24 | void objectRemoved(LwM2mObjectEnabler object); 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/listener/ResourceListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.resource.listener; 17 | 18 | import org.eclipse.leshan.core.node.LwM2mPath; 19 | 20 | public interface ResourceListener { 21 | void resourceChanged(LwM2mPath... paths); 22 | } 23 | -------------------------------------------------------------------------------- /leshan-lwm2m-client/src/test/java/org/eclipse/leshan/client/servers/LwM2mServerTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.client.servers; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mServerTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(LwM2mServer.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/certificates/certificates.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/leshan-lwm2m-core/certificates/certificates.jks -------------------------------------------------------------------------------- /leshan-lwm2m-core/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/Destroyable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core; 17 | 18 | public interface Destroyable { 19 | 20 | /** Destroy the instances and frees all system resources. */ 21 | void destroy(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/Startable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core; 17 | 18 | public interface Startable { 19 | 20 | void start(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/Stoppable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core; 17 | 18 | public interface Stoppable { 19 | 20 | void stop(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/endpoint/EndPointUriParser.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2024 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.endpoint; 17 | 18 | public interface EndPointUriParser { 19 | 20 | EndpointUri parse(String Uri) throws InvalidEndpointUriException; 21 | 22 | void validateScheme(String scheme) throws InvalidEndpointUriException; 23 | 24 | void validateHost(String host) throws InvalidEndpointUriException; 25 | 26 | void validatePort(String port) throws InvalidEndpointUriException; 27 | 28 | void validatePort(Integer port) throws InvalidEndpointUriException; 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/endpoint/LwM2mEndpoint.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2025 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.endpoint; 17 | 18 | public interface LwM2mEndpoint { 19 | 20 | Protocol getProtocol(); 21 | 22 | EndpointUri getURI(); 23 | 24 | String getDescription(); 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/json/LwM2mJsonDecoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.json; 17 | 18 | /** 19 | * A decoder fo rthe old deprecated LwM2m format. 20 | */ 21 | public interface LwM2mJsonDecoder { 22 | 23 | JsonRootObject fromJsonLwM2m(String jsonString) throws LwM2mJsonException; 24 | } 25 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/json/LwM2mJsonEncoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.json; 17 | 18 | /** 19 | * An encoder for the old deprecated LwM2m format. 20 | */ 21 | public interface LwM2mJsonEncoder { 22 | 23 | public String toJsonLwM2m(JsonRootObject jro) throws LwM2mJsonException; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/link/LinkParser.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Orange. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Michał Wadowski (Orange) - Improved compliance with rfc6690. 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link; 17 | 18 | /** 19 | * A CoRE Link parser interface. 20 | *

21 | * Parser should implement rules defined in https://datatracker.ietf.org/doc/html/RFC6690#section-2 22 | */ 23 | public interface LinkParser { 24 | 25 | /** 26 | * Parse text content in format defined in RFC RFC6690 into array of links {@link Link}. 27 | * 28 | * @param bytes content to parse as array of bytes. 29 | */ 30 | Link[] parseCoreLinkFormat(byte[] bytes) throws LinkParseException; 31 | } 32 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/link/LinkSerializer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Orange. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Michał Wadowski (Orange) - Improved compliance with rfc6690. 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link; 17 | 18 | /** 19 | * A CoRE Link serializer interface. 20 | *

21 | * Serializer will serialize links {@link Link} in format defined in 22 | * https://datatracker.ietf.org/doc/html/RFC6690#section-2 23 | */ 24 | public interface LinkSerializer { 25 | 26 | /** 27 | * Serialize links {@link Link} into String in format defined in RFC RFC6690. 28 | * 29 | * @param linkObjects array of {@link Link} 30 | */ 31 | String serializeCoreLinkFormat(Link... linkObjects); 32 | } 33 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/link/lwm2m/LwM2mLinkParser.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link.lwm2m; 17 | 18 | import org.eclipse.leshan.core.link.LinkParseException; 19 | import org.eclipse.leshan.core.link.LinkParser; 20 | 21 | /** 22 | * A {@link LinkParser} with some LWM2M flavor. 23 | */ 24 | public interface LwM2mLinkParser extends LinkParser { 25 | 26 | LwM2mLink[] parseLwM2mLinkFromCoreLinkFormat(byte[] bytes, String rootPath) throws LinkParseException; 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/link/lwm2m/attributes/AttributeClass.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link.lwm2m.attributes; 17 | 18 | /** 19 | * Attributes are organized according to their purpose; 20 | *

21 | * 2 Class of Attributes are supported: 22 | *

    23 | *
  • {@link AttributeClass#NOTIFICATION} gather Attributes regarding Notify operations parameters 24 | *
  • {@link AttributeClass#PROPERTIES} gather Attributes regarding general information 25 | *
26 | */ 27 | public enum AttributeClass { 28 | PROPERTIES, NOTIFICATION 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/node/LwM2mNode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | /** 19 | * A node in the LWM2M resource tree: Root, Objects, Object instances, Resources or Resource instances. 20 | */ 21 | public interface LwM2mNode { 22 | 23 | /** 24 | * Accept a visitor for this node. 25 | */ 26 | void accept(LwM2mNodeVisitor visitor); 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/node/LwM2mNodeVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | /** 19 | * A visitor to visit an object, an object instance, or a resource. 20 | */ 21 | public interface LwM2mNodeVisitor { 22 | 23 | void visit(LwM2mRoot root); 24 | 25 | void visit(LwM2mObject object); 26 | 27 | void visit(LwM2mObjectInstance instance); 28 | 29 | void visit(LwM2mResource resource); 30 | 31 | void visit(LwM2mResourceInstance instance); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/peer/LwM2mIdentity.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless, Orange Polska S.A. - initial API and implementation 15 | *******************************************************************************/ 16 | 17 | package org.eclipse.leshan.core.peer; 18 | 19 | public interface LwM2mIdentity { 20 | // String getKeyIdentifier(); // TODO I don't know if we really need this. 21 | 22 | boolean isSecure(); 23 | } 24 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/peer/LwM2mPeer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless, Orange Polska S.A. - initial API and implementation 15 | *******************************************************************************/ 16 | 17 | package org.eclipse.leshan.core.peer; 18 | 19 | public interface LwM2mPeer { 20 | LwM2mIdentity getIdentity(); 21 | } 22 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/AbstractLwM2mRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.response.LwM2mResponse; 19 | 20 | public abstract class AbstractLwM2mRequest implements LwM2mRequest { 21 | 22 | private final Object coapRequest; 23 | 24 | public AbstractLwM2mRequest(Object coapRequest) { 25 | this.coapRequest = coapRequest; 26 | } 27 | 28 | @Override 29 | public Object getCoapRequest() { 30 | return coapRequest; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/DownlinkRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.response.LwM2mResponse; 19 | 20 | /** 21 | * A Downlink Lightweight M2M request.
22 | * This is a request sent from server to client to interact with the client resource tree. 23 | */ 24 | public interface DownlinkRequest extends LwM2mRequest { 25 | 26 | /** 27 | * Accept a visitor for this request. 28 | */ 29 | void accept(DownlinkRequestVisitor visitor); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/DownlinkRequestVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | * Michał Wadowski (Orange) - Add Observe-Composite feature. 16 | * Michał Wadowski (Orange) - Add Cancel Composite-Observation feature. 17 | *******************************************************************************/ 18 | package org.eclipse.leshan.core.request; 19 | 20 | /** 21 | * A visitor to visit a Downlink Lightweight M2M request. 22 | */ 23 | public interface DownlinkRequestVisitor 24 | extends DownlinkDeviceManagementRequestVisitor, DownlinkBootstrapRequestVisitor { 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/SimpleDownlinkRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.node.LwM2mPath; 19 | import org.eclipse.leshan.core.response.LwM2mResponse; 20 | 21 | /** 22 | * A simple {@link DownlinkRequest} which targets only 1 node. 23 | */ 24 | public interface SimpleDownlinkRequest extends DownlinkRequest { 25 | /** 26 | * Gets the node path targeted by the request. 27 | * 28 | * @return the request path 29 | */ 30 | LwM2mPath getPath(); 31 | } 32 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkBootstrapRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.response.LwM2mResponse; 19 | 20 | /** 21 | * A Uplink Bootstrap Lightweight M2M request.
22 | * This is a request sent from client to server. 23 | */ 24 | public interface UplinkBootstrapRequest extends UplinkRequest { 25 | 26 | /** 27 | * Accept a visitor for this request. 28 | */ 29 | void accept(UplinkBootstrapRequestVisitor visitor); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkBootstrapRequestVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | /** 19 | * A visitor to visit an Uplink Bootstrap Lightweight M2M request. 20 | */ 21 | public interface UplinkBootstrapRequestVisitor { 22 | 23 | void visit(BootstrapRequest request); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkDeviceManagementRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.response.LwM2mResponse; 19 | 20 | /** 21 | * A Uplink Device Management Lightweight M2M request.
22 | * This is a request sent from client to server. 23 | */ 24 | public interface UplinkDeviceManagementRequest extends UplinkRequest { 25 | 26 | /** 27 | * Accept a visitor for this request. 28 | */ 29 | void accept(UplinkDeviceManagementRequestVisitor visitor); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkDeviceManagementRequestVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | /** 19 | * A visitor to visit an Uplink Device Mangement Lightweight M2M request. 20 | */ 21 | public interface UplinkDeviceManagementRequestVisitor { 22 | void visit(RegisterRequest request); 23 | 24 | void visit(UpdateRequest request); 25 | 26 | void visit(DeregisterRequest request); 27 | 28 | void visit(SendRequest sendRequest); 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkRequest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | import org.eclipse.leshan.core.response.LwM2mResponse; 19 | 20 | /** 21 | * A Uplink Lightweight M2M request.
22 | * This is a request sent from client to server. 23 | */ 24 | public interface UplinkRequest extends LwM2mRequest { 25 | 26 | /** 27 | * Accept a visitor for this request. 28 | */ 29 | void accept(UplinkRequestVisitor visitor); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/UplinkRequestVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request; 17 | 18 | /** 19 | * A visitor to visit an Uplink Lightweight M2M request. 20 | */ 21 | public interface UplinkRequestVisitor extends UplinkDeviceManagementRequestVisitor, UplinkBootstrapRequestVisitor { 22 | } 23 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/exception/ClientSleepingException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2017 RISE SICS AB. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * RISE SICS AB - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request.exception; 17 | 18 | /** 19 | * Exception indicating that the message was cancelled on the CoAP layer and any retries will be stopped. 20 | */ 21 | public class ClientSleepingException extends RuntimeException { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | public ClientSleepingException(String message, Object... args) { 26 | super(String.format(message, args)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/exception/RequestRejectedException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Bosch Software Innovations GmbH and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Bosch Software Innovations GmbH 15 | * - initial API and implementation 16 | *******************************************************************************/ 17 | package org.eclipse.leshan.core.request.exception; 18 | 19 | /** 20 | * Exception indicating that the message was rejected by the Request receiver. 21 | */ 22 | public class RequestRejectedException extends RuntimeException { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | public RequestRejectedException(String message, Object... args) { 27 | super(String.format(message, args)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/response/ErrorCallback.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.response; 17 | 18 | /** 19 | * On error callback for LWM2M request. 20 | */ 21 | public interface ErrorCallback { 22 | // We should keep this as a 1 method interface to be java 8 lambda compatible. 23 | 24 | /** 25 | * Called when the request failed 26 | */ 27 | void onError(Exception e); 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/response/ResponseCallback.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.response; 17 | 18 | /** 19 | * On success callback for LWM2M request. 20 | */ 21 | public interface ResponseCallback { 22 | // We should keep this as a 1 method interface to be java 8 lambda compatible. 23 | 24 | /** 25 | * Called when the request succeed. 26 | */ 27 | void onResponse(T response); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/tlv/TlvException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.tlv; 17 | 18 | public class TlvException extends Exception { 19 | 20 | public TlvException(String message) { 21 | super(message); 22 | } 23 | 24 | public TlvException(String message, Exception cause) { 25 | super(message, cause); 26 | } 27 | 28 | private static final long serialVersionUID = 9017593873541376092L; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/util/base64/Base64Decoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * All rights reserved. This program and the accompanying materials 3 | * are made available under the terms of the Eclipse Public License v2.0 4 | * and Eclipse Distribution License v1.0 which accompany this distribution. 5 | * 6 | * The Eclipse Public License is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * and the Eclipse Distribution License is available at 9 | * http://www.eclipse.org/org/documents/edl-v10.html. 10 | * 11 | * Contributors: 12 | * Adam Serodzinski, Jarosław Legierski 13 | * Orange Polska S.A. - initial API and implementation 14 | *******************************************************************************/ 15 | 16 | package org.eclipse.leshan.core.util.base64; 17 | 18 | public interface Base64Decoder { 19 | 20 | byte[] decode(String encoded) throws InvalidBase64Exception; 21 | 22 | byte[] decode(byte[] encoded) throws InvalidBase64Exception; 23 | } 24 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/util/base64/Base64Encoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * All rights reserved. This program and the accompanying materials 3 | * are made available under the terms of the Eclipse Public License v2.0 4 | * and Eclipse Distribution License v1.0 which accompany this distribution. 5 | * 6 | * The Eclipse Public License is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * and the Eclipse Distribution License is available at 9 | * http://www.eclipse.org/org/documents/edl-v10.html. 10 | * 11 | * Contributors: 12 | * Adam Serodzinski 13 | * Orange Polska S.A. - initial API and implementation 14 | *******************************************************************************/ 15 | 16 | package org.eclipse.leshan.core.util.base64; 17 | 18 | public interface Base64Encoder { 19 | String encode(byte[] dataToEncode); 20 | } 21 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/senml/SenMLDecoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.senml; 17 | 18 | /** 19 | * A decoder for SenML format. 20 | * 21 | * @see rfc8428 - Sensor Measurement Lists (SenML) 22 | */ 23 | public interface SenMLDecoder { 24 | 25 | SenMLPack fromSenML(byte[] encodedSenML) throws SenMLException; 26 | } 27 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/main/java/org/eclipse/leshan/senml/SenMLEncoder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.senml; 17 | 18 | /** 19 | * An encoder for SenML format. 20 | * 21 | * @see rfc8428 - Sensor Measurement Lists (SenML) 22 | */ 23 | public interface SenMLEncoder { 24 | 25 | public byte[] toSenML(SenMLPack pack) throws SenMLException; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/ResponseCodeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ResponseCodeTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(ResponseCode.class).withIgnoredFields("name").verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/endpoint/EndpointUriTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2024 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.endpoint; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | public class EndpointUriTest { 23 | 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(EndpointUri.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/endpoint/ProtocolTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.endpoint; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ProtocolTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(Protocol.class).withIgnoredFields("uriScheme").verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/json/JsonArrayEntryTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | 17 | package org.eclipse.leshan.core.json; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import nl.jqno.equalsverifier.EqualsVerifier; 22 | 23 | class JsonArrayEntryTest { 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(JsonArrayEntry.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/json/JsonRootObjectTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | 17 | package org.eclipse.leshan.core.json; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import nl.jqno.equalsverifier.EqualsVerifier; 22 | 23 | class JsonRootObjectTest { 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(JsonRootObject.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/link/LinkTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link; 17 | 18 | import org.eclipse.leshan.core.link.lwm2m.MixedLwM2mLink; 19 | import org.junit.jupiter.api.Test; 20 | 21 | import nl.jqno.equalsverifier.EqualsVerifier; 22 | 23 | class LinkTest { 24 | @Test 25 | void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(Link.class).withRedefinedSubclass(MixedLwM2mLink.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/link/attributes/ValuelessAttributeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.link.attributes; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ValuelessAttributeTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(ValuelessAttribute.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/model/LwM2mModelRepositoryTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | 17 | package org.eclipse.leshan.core.model; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import nl.jqno.equalsverifier.EqualsVerifier; 22 | 23 | class LwM2mModelRepositoryTest { 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(LwM2mModelRepository.Key.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mMultipleResourceTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mMultipleResourceTest { 23 | 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(LwM2mMultipleResource.class).verify(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mObjectInstanceTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mObjectInstanceTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(LwM2mObjectInstance.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mObjectTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mObjectTest { 23 | 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(LwM2mObject.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mResourceInstanceTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mResourceInstanceTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(LwM2mResourceInstance.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mRootTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mRootTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(LwM2mRoot.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/LwM2mSingleResourceTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class LwM2mSingleResourceTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(LwM2mSingleResource.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/ObjectLinkTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ObjectLinkTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(ObjectLink.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/TimestampedLwM2mNodeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.node; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class TimestampedLwM2mNodeTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(TimestampedLwM2mNode.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/observation/ObservationIdentifierTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.observation; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ObservationIdentifierTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(ObservationIdentifier.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/oscore/AeadAlgorithmTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.oscore; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class AeadAlgorithmTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(AeadAlgorithm.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/oscore/OscoreSettingTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.oscore; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class OscoreSettingTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(OscoreSetting.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/IpPeerTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class IpPeerTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(IpPeer.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/OscoreIdentityTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class OscoreIdentityTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(OscoreIdentity.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/PskIdentityTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class PskIdentityTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(PskIdentity.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/RpkIdentityTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class RpkIdentityTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(RpkIdentity.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/SocketIdentityTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class SocketIdentityTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(SocketIdentity.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/peer/X509IdentityTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.peer; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class X509IdentityTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(X509Identity.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/request/argument/ArgumentTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.request.argument; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ArgumentTest { 23 | 24 | @Test 25 | public void assertEqualsHashcode() { 26 | EqualsVerifier.forClass(Argument.class).verify(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/util/TestToolBox.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2024 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.util; 17 | 18 | import org.eclipse.leshan.core.endpoint.DefaultEndPointUriHandler; 19 | import org.eclipse.leshan.core.endpoint.EndPointUriHandler; 20 | 21 | public class TestToolBox { 22 | 23 | public static EndPointUriHandler uriHandler = new DefaultEndPointUriHandler(); 24 | } 25 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/util/datatype/ULongTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.core.util.datatype; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class ULongTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(ULong.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/senml/SenMLPackTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.senml; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class SenMLPackTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(SenMLPack.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-lwm2m-core/src/test/java/org/eclipse/leshan/senml/SenMLRecordTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.senml; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class SenMLRecordTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(SenMLRecord.class).verify(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/model/StandardModelProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.model; 17 | 18 | import org.eclipse.leshan.core.model.ObjectLoader; 19 | 20 | /** 21 | * A versioned model provider which uses the default model embedded in Leshan. 22 | * 23 | * @see VersionedModelProvider 24 | */ 25 | public class StandardModelProvider extends VersionedModelProvider { 26 | 27 | public StandardModelProvider() { 28 | super(ObjectLoader.loadAllDefault()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/profile/ClientProfileProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.profile; 17 | 18 | import org.eclipse.leshan.core.peer.LwM2mIdentity; 19 | 20 | public interface ClientProfileProvider { 21 | 22 | ClientProfile getProfile(LwM2mIdentity identity); 23 | } 24 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/queue/ClientAwakeTimeProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2018 RISE SICS AB. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * RISE SICS AB - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.queue; 17 | 18 | import org.eclipse.leshan.server.registration.Registration; 19 | 20 | public interface ClientAwakeTimeProvider { 21 | 22 | /** 23 | * Returns the client awake time for the corresponding client, identified by the {@link Registration} object. 24 | * 25 | * @param reg the client's registration object 26 | * @return the client awake time in milliseconds 27 | */ 28 | int getClientAwakeTime(Registration reg); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/registration/ExpirationListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.registration; 17 | 18 | import java.util.Collection; 19 | 20 | import org.eclipse.leshan.core.observation.Observation; 21 | 22 | /** 23 | * A listener to be aware of registration expiration. 24 | * 25 | * @see RegistrationStore 26 | */ 27 | public interface ExpirationListener { 28 | 29 | void registrationExpired(Registration registration, Collection observations); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/registration/RandomStringRegistrationIdProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2018 NTELS and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Rokwoon Kim (contracted with NTELS) - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.registration; 17 | 18 | import org.eclipse.leshan.core.request.RegisterRequest; 19 | import org.eclipse.leshan.core.util.RandomStringUtils; 20 | 21 | public class RandomStringRegistrationIdProvider implements RegistrationIdProvider { 22 | 23 | @Override 24 | public String getRegistrationId(RegisterRequest registerRequest) { 25 | return RandomStringUtils.random(10, true, true); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/request/LowerLayerConfig.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.request; 17 | 18 | /** 19 | * Allow to apply custom configuration to lower layer. 20 | *

21 | * If you are using LWM2M over CoAP this setter will help you to apply CoAP setting to you request. 22 | * 23 | * @since 1.2 24 | */ 25 | public interface LowerLayerConfig { 26 | 27 | /** 28 | * @param lowerRequest the lower layer request. E.g. could be a CoAP request. 29 | */ 30 | void apply(Object lowerRequest); 31 | } 32 | -------------------------------------------------------------------------------- /leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/send/SendService.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.server.send; 17 | 18 | import org.eclipse.leshan.core.request.SendRequest; 19 | 20 | /** 21 | * Service used to monitor "Send Operation" used by LWM2M client. 22 | * 23 | * @see SendRequest 24 | */ 25 | public interface SendService { 26 | 27 | void addListener(SendListener listener); 28 | 29 | void removeListener(SendListener listener); 30 | } 31 | -------------------------------------------------------------------------------- /leshan-lwm2m-servers-shared/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-lwm2m-servers-shared/src/main/java/org/eclipse/leshan/servers/security/SecurityStoreListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.servers.security; 17 | 18 | /** 19 | * A Listener for {@link SecurityStore} 20 | */ 21 | public interface SecurityStoreListener { 22 | /** 23 | * Called when {@link SecurityInfo} are removed. 24 | * 25 | * @param infosAreCompromised True if info are compromised and should not be used immediately 26 | * @param infos Array of removed {@link SecurityInfo} 27 | */ 28 | void securityInfoRemoved(boolean infosAreCompromised, SecurityInfo... infos); 29 | } 30 | -------------------------------------------------------------------------------- /leshan-lwm2m-servers-shared/src/test/java/org/eclipse/leshan/servers/security/SecurityInfoTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.servers.security; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class SecurityInfoTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(SecurityInfo.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-tl-cf-bsserver-coap-oscore/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-bsserver-coap/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-client-coap-oscore/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-client-coap-oscore/src/main/java/org/eclipse/leshan/transport/californium/client/endpoint/coap/CoapOscoreProtocolProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium.client.endpoint.coap; 17 | 18 | import org.eclipse.leshan.transport.californium.client.endpoint.CaliforniumClientEndpointFactory; 19 | 20 | public class CoapOscoreProtocolProvider extends CoapClientProtocolProvider { 21 | 22 | @Override 23 | public CaliforniumClientEndpointFactory createDefaultEndpointFactory() { 24 | return new CoapOscoreClientEndpointFactory(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /leshan-tl-cf-client-coap/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-client-coap/src/main/java/org/eclipse/leshan/transport/californium/client/CaliforniumConnectionController.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium.client; 17 | 18 | import org.eclipse.californium.core.network.Endpoint; 19 | import org.eclipse.leshan.client.servers.LwM2mServer; 20 | 21 | public interface CaliforniumConnectionController { 22 | void forceReconnection(Endpoint endpoint, LwM2mServer server, boolean resume); 23 | } 24 | -------------------------------------------------------------------------------- /leshan-tl-cf-client-coap/src/main/java/org/eclipse/leshan/transport/californium/client/endpoint/ServerIdentityExtractor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium.client.endpoint; 17 | 18 | import org.eclipse.californium.core.network.Exchange; 19 | import org.eclipse.leshan.client.servers.LwM2mServer; 20 | import org.eclipse.leshan.core.peer.IpPeer; 21 | 22 | public interface ServerIdentityExtractor { 23 | LwM2mServer extractIdentity(Exchange exchange, IpPeer foreignPeer); 24 | } 25 | -------------------------------------------------------------------------------- /leshan-tl-cf-server-coap-oscore/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-server-coap/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared-oscore/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared-oscore/src/test/java/org/eclipse/leshan/transport/californium/oscore/cf/OscoreParametersTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium.oscore.cf; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class OscoreParametersTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(OscoreParameters.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared/src/main/java/org/eclipse/leshan/transport/californium/AbstractRequestObserver.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2016 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium; 17 | 18 | import org.eclipse.californium.core.coap.MessageObserverAdapter; 19 | import org.eclipse.californium.core.coap.Request; 20 | 21 | public abstract class AbstractRequestObserver extends MessageObserverAdapter { 22 | Request coapRequest; 23 | 24 | public AbstractRequestObserver(Request coapRequest) { 25 | this.coapRequest = coapRequest; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared/src/main/java/org/eclipse/leshan/transport/californium/CoapResponseCallback.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2018 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium; 17 | 18 | import org.eclipse.californium.core.coap.Response; 19 | 20 | /** 21 | * On success callback for request. 22 | */ 23 | public interface CoapResponseCallback { 24 | // We should keep this as a 1 method interface to be java 8 lambda compatible. 25 | 26 | /** 27 | * Called when the request succeed. 28 | * 29 | * @param response The CoAP response received. 30 | */ 31 | void onResponse(Response response); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared/src/main/java/org/eclipse/leshan/transport/californium/ExceptionTranslator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium; 17 | 18 | import org.eclipse.californium.core.coap.Request; 19 | 20 | public interface ExceptionTranslator { 21 | 22 | /** 23 | * Translate exception from underlying transport layer to LwM2m Exception. 24 | */ 25 | Exception translate(Request coapRequest, Throwable error); 26 | } 27 | -------------------------------------------------------------------------------- /leshan-tl-cf-shared/src/main/java/org/eclipse/leshan/transport/californium/identity/IdentityHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.californium.identity; 17 | 18 | import org.eclipse.californium.core.coap.Message; 19 | import org.eclipse.californium.elements.EndpointContext; 20 | import org.eclipse.leshan.core.peer.LwM2mPeer; 21 | 22 | public interface IdentityHandler { 23 | 24 | LwM2mPeer getIdentity(Message receivedMessage); 25 | 26 | EndpointContext createEndpointContext(LwM2mPeer client, boolean allowConnectionInitiation); 27 | } 28 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/main/java/org/eclipse/leshan/transport/javacoap/client/observe/LwM2mKeys.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.observe; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.leshan.core.node.LwM2mPath; 21 | 22 | import com.mbed.coap.transport.TransportContext.Key; 23 | 24 | public class LwM2mKeys { 25 | 26 | // Keys for Observe Request 27 | public static final Key> LESHAN_OBSERVED_PATHS = new Key<>(null); 28 | public static final Key LESHAN_NOTIFICATION = new Key<>(null); 29 | } 30 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/main/java/org/eclipse/leshan/transport/javacoap/client/observe/ObserversListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2024 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.observe; 17 | 18 | import com.mbed.coap.packet.CoapRequest; 19 | 20 | public interface ObserversListener { 21 | 22 | void observersAdded(CoapRequest request); 23 | 24 | void observersRemoved(CoapRequest request); 25 | } 26 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/main/java/org/eclipse/leshan/transport/javacoap/client/observe/ObserversStore.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.observe; 17 | 18 | import com.mbed.coap.packet.CoapRequest; 19 | 20 | public interface ObserversStore extends Iterable { 21 | 22 | void add(CoapRequest observeRequest); 23 | 24 | void remove(CoapRequest observeRequest); 25 | 26 | boolean contains(CoapRequest observeRequest); 27 | 28 | void addListener(ObserversListener listener); 29 | 30 | void removeListener(ObserversListener listener); 31 | } 32 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/main/java/org/eclipse/leshan/transport/javacoap/client/resource/ServerIdentityExtractor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.resource; 17 | 18 | import org.eclipse.leshan.client.servers.LwM2mServer; 19 | import org.eclipse.leshan.core.peer.IpPeer; 20 | 21 | public interface ServerIdentityExtractor { 22 | 23 | LwM2mServer extractIdentity(IpPeer foreignPeer); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/test/java/org/eclipse/leshan/transport/javacoap/client/observe/HashMapObserversStoreTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.observe; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class HashMapObserversStoreTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(HashMapObserversStore.ObserverKey.class).verify(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /leshan-tl-jc-client-coap/src/test/java/org/eclipse/leshan/transport/javacoap/client/resource/RouterServiceTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2013-2015 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Natalia Krzykała Orange Polska S.A. - initial implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.client.resource; 17 | 18 | import org.junit.jupiter.api.Test; 19 | 20 | import nl.jqno.equalsverifier.EqualsVerifier; 21 | 22 | class RouterServiceTest { 23 | @Test 24 | public void assertEqualsHashcode() { 25 | EqualsVerifier.forClass(RouterService.RequestMatcher.class).verify(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /leshan-tl-jc-server-coap/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-jc-server-coaptcp/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-jc-shared/logback-leshan-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 27 | %d %p %C{1} [%t] %m%n 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /leshan-tl-jc-shared/src/main/java/org/eclipse/leshan/transport/javacoap/State.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2023 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap; 17 | 18 | public enum State { 19 | INITIAL, STARTED, STOPPED, DESTROYED; 20 | 21 | public boolean isStarted() { 22 | return this.equals(STARTED); 23 | } 24 | 25 | public boolean isStopped() { 26 | return this.equals(STOPPED); 27 | } 28 | 29 | public boolean isDestroyed() { 30 | return this.equals(DESTROYED); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /leshan-tl-jc-shared/src/main/java/org/eclipse/leshan/transport/javacoap/identity/IdentityHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2022 Sierra Wireless and others. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. 7 | * 8 | * The Eclipse Public License is available at 9 | * http://www.eclipse.org/legal/epl-v20.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.html. 12 | * 13 | * Contributors: 14 | * Sierra Wireless - initial API and implementation 15 | *******************************************************************************/ 16 | package org.eclipse.leshan.transport.javacoap.identity; 17 | 18 | import org.eclipse.leshan.core.peer.LwM2mPeer; 19 | 20 | import com.mbed.coap.transport.TransportContext; 21 | 22 | public interface IdentityHandler { 23 | 24 | LwM2mPeer getIdentity(Object receivedMessage); 25 | 26 | TransportContext createTransportContext(LwM2mPeer client, boolean allowConnectionInitiation); 27 | } 28 | -------------------------------------------------------------------------------- /notice.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-leshan/leshan/0ac622102a83c793ddcb2be1d7cc16e343c26765/notice.html --------------------------------------------------------------------------------