congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
UpdateRequest.getRegistrationId
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.eclipse.leshan.core.request.UpdateRequest.getRegistrationId (Showing top 2 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: 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));
  }
}
org.eclipse.leshan.core.requestUpdateRequestgetRegistrationId

Popular methods of UpdateRequest

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

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Menu (java.awt)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • 21 Best IntelliJ Plugins
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