org.eclipse.leshan.server.model.LwM2mModelProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leshan-all Show documentation
Show all versions of leshan-all Show documentation
A LWM2M client and server based on Californium (CoAP) all in one.
/*******************************************************************************
* Copyright (c) 2015 Sierra Wireless and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.html.
*
* Contributors:
* Sierra Wireless - initial API and implementation
*******************************************************************************/
package org.eclipse.leshan.server.model;
import org.eclipse.leshan.core.model.LwM2mModel;
import org.eclipse.leshan.core.node.codec.LwM2mNodeDecoder;
import org.eclipse.leshan.core.node.codec.LwM2mNodeEncoder;
import org.eclipse.leshan.server.registration.Registration;
/**
* A LwM2mModelProvider
implementation is in charge of returning the description of the LWM2M objects for
* each registered client.
*
* The description of each object is mainly used by the {@link LwM2mNodeEncoder}/{@link LwM2mNodeDecoder} to
* encode/decode the requests/responses payload.
*
*
* A typical use case to implement a custom provider is the need to support several version of the specification.
*
*/
public interface LwM2mModelProvider {
/**
* Returns the description of the objects supported by the given registration.
*
* @param registration the registered client
* @return the list of object descriptions
*/
LwM2mModel getObjectModel(Registration registration);
}