Overview
The current document describes in details the com.prosyst.mprm.backend.tr069.spi package, as it is the one that provides the basic methods for plugging vendor-specific methods. Besides the above mentioned package the TR-069 Device Management Package API provides a set of packages delivering means for implementing CPE WAN Management (TR-069) Protocol.
To be able to integrate vendor-specific methods, you have to implement both the CPEMethod and the ACSMethod interface. Then the implementations need to be registered as OSGi services. You can also implement custom listeners for the Inform, TransferCompleted, Kicked, RequestDownload methods and you just have to register the implementations as OSGi services.
Custom CPEMethod Implementation
An example of CPEMethod implementation is provided below:
import com.prosyst.mprm.backend.tr069.spi.CPEMethod;import com.prosyst.mprm.backend.tr069.encoding.RPCStructMeta;public class MyCPEMethodImpl implements CPEMethod { private String customMethod; private String responseMethod; public MyCPEMethodImpl(String customMethod, String responseMethod) { this.customMethod = customMethod; this.responseMethod = responseMethod; } public RPCStructMeta getMethodMeta() { return new RPCStructMeta( "urn:prosyst:cbm-1-0", "cbm", false, customMethod, new String[]{"BundleId"}, new Class[]{long.class}, responseMethod ); } public RPCStructMeta getResponseMeta() { return new RPCStructMeta( "urn:prosyst:cbm-1-0", "cbm", true, responseMethod, new String[]{"Status"}, new Class[]{int.class}, customMethod ); } public String[] getMethodParameterDescriptions() { return new String[]{"Bundle Id"}; } public String[] getResponseParameterDescriptions() { return new String[]{"Status"}; } public String toString() { return "Custom method: " + customMethod + " ; Response method: " + responseMethod; }}