congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
UpdateRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
UpdateRequest
in
org.eclipse.leshan.core.request

Best Java code snippets using org.eclipse.leshan.core.request.UpdateRequest (Showing top 5 results out of 315)

origin: eclipse/leshan

public SendableResponse<UpdateResponse> update(Identity sender, UpdateRequest updateRequest) {
  Registration registration = registrationService.getById(updateRequest.getRegistrationId());
  if (registration == null) {
    return new SendableResponse<>(UpdateResponse.notFound());
  final RegistrationUpdate update = new RegistrationUpdate(updateRequest.getRegistrationId(), sender,
      updateRequest.getLifeTimeInSec(), updateRequest.getSmsNumber(), updateRequest.getBindingMode(),
      updateRequest.getObjectLinks(), updateRequest.getAdditionalAttributes());
origin: org.eclipse.leshan/leshan-server-cf

  objectLinks = LinkObject.parse(request.getPayload());
UpdateRequest updateRequest = new UpdateRequest(registrationId, request.getSource(), request.getSourcePort(),
    lifetime, smsNumber, binding, objectLinks);
origin: eclipse/leshan

  objectLinks = Link.parse(request.getPayload());
UpdateRequest updateRequest = new UpdateRequest(registrationId, lifetime, smsNumber, binding, objectLinks,
    additionalParams);
origin: eclipse/leshan

@Override
public void visit(UpdateRequest request) {
  coapRequest = Request.newPost();
  buildRequestSettings();
  coapRequest.getOptions().setUriPath(request.getRegistrationId());
  Long lifetime = request.getLifeTimeInSec();
  if (lifetime != null)
    coapRequest.getOptions().addUriQuery("lt=" + lifetime);
  String smsNumber = request.getSmsNumber();
  if (smsNumber != null)
    coapRequest.getOptions().addUriQuery("sms=" + smsNumber);
  BindingMode bindingMode = request.getBindingMode();
  if (bindingMode != null)
    coapRequest.getOptions().addUriQuery("b=" + bindingMode.toString());
  Link[] linkObjects = request.getObjectLinks();
  if (linkObjects != null) {
    coapRequest.getOptions().setContentFormat(ContentFormat.LINK.getCode());
    coapRequest.setPayload(Link.serialize(linkObjects));
  }
}
origin: eclipse/leshan

try {
  UpdateResponse response = sender.send(dmInfo.getAddress(), dmInfo.isSecure(),
      new UpdateRequest(registrationID, null, null, null, null, null), DEFAULT_TIMEOUT);
  if (response == null) {
    registrationID = null;
org.eclipse.leshan.core.requestUpdateRequest

Javadoc

A Lightweight M2M request for updating the LWM2M Client properties required by the LWM2M Server to contact the LWM2M Client.

Most used methods

  • <init>
  • getBindingMode
  • getLifeTimeInSec
  • getObjectLinks
  • getRegistrationId
  • getSmsNumber
  • getAdditionalAttributes

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • Menu (java.awt)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now