diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
index 6d42e9d..4e3534d 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
@@ -34,6 +34,7 @@
 import org.onosproject.yang.compiler.datamodel.YangIdentityRef;
 import org.onosproject.yang.compiler.datamodel.YangIfFeature;
 import org.onosproject.yang.compiler.datamodel.YangImport;
+import org.onosproject.yang.compiler.datamodel.YangInput;
 import org.onosproject.yang.compiler.datamodel.YangLeaf;
 import org.onosproject.yang.compiler.datamodel.YangLeafList;
 import org.onosproject.yang.compiler.datamodel.YangLeafRef;
@@ -46,6 +47,7 @@
 import org.onosproject.yang.compiler.datamodel.YangMustHolder;
 import org.onosproject.yang.compiler.datamodel.YangNode;
 import org.onosproject.yang.compiler.datamodel.YangNotification;
+import org.onosproject.yang.compiler.datamodel.YangOutput;
 import org.onosproject.yang.compiler.datamodel.YangReferenceResolver;
 import org.onosproject.yang.compiler.datamodel.YangResolutionInfo;
 import org.onosproject.yang.compiler.datamodel.YangRpc;
@@ -1219,4 +1221,38 @@
         }
         return null;
     }
+
+    /**
+     * Searches for input in given RPC node.
+     *
+     * @return input node
+     */
+    public static YangNode findRpcInput(YangNode rpc) {
+        YangNode child = rpc.getChild();
+        while (child != null) {
+            if (!(child instanceof YangInput)) {
+                child = child.getNextSibling();
+                continue;
+            }
+            return child;
+        }
+        return null;
+    }
+
+    /**
+     * Searches for output in given RPC node.
+     *
+     * @return output node
+     */
+    public static YangNode findRpcOutput(YangNode rpc) {
+        YangNode child = rpc.getChild();
+        while (child != null) {
+            if (!(child instanceof YangOutput)) {
+                child = child.getNextSibling();
+                continue;
+            }
+            return child;
+        }
+        return null;
+    }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
index d48c4f9..f512ef6 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
@@ -94,6 +94,33 @@
     public static final int GENERATE_KEY_CLASS = 4096;
 
     /**
+     * Default RPC handler class.
+     */
+    public static final int GENERATE_RPC_HANDLER_CLASS = 8192;
+
+    /**
+     * Register RPC class.
+     */
+    public static final int GENERATE_RPC_REGISTER_CLASS = 16384;
+
+    /**
+     * RPC command class.
+     */
+    public static final int GENERATE_RPC_COMMAND_CLASS = 32768;
+
+    /**
+     * Extended RPC command class.
+     */
+    public static final int GENERATE_RPC_EXTENDED_COMMAND_CLASS = 65536;
+
+    /**
+     * Java classes for RPC.
+     */
+    public static final int GENERATE_ALL_RPC_CLASS_MASK =
+            GENERATE_RPC_HANDLER_CLASS | GENERATE_RPC_REGISTER_CLASS
+                    | GENERATE_RPC_EXTENDED_COMMAND_CLASS;
+
+    /**
      * Creates an instance of generate java file type.
      */
     private GeneratedJavaFileType() {
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/JavaImportData.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/JavaImportData.java
index 59647f9..5b53ef1 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/JavaImportData.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/JavaImportData.java
@@ -23,24 +23,41 @@
 import static java.util.Collections.sort;
 import static java.util.Collections.unmodifiableSortedSet;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getImportString;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getStaticImportString;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT_EVENT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ARRAY_LIST_IMPORT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIG_INTEGER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BITSET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COLLECTION_IMPORTS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CONFIG_PKG;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DATA_NODE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DYNAMIC_CONFIG_SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EVENT_LISTENER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EXECUTORS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EXECUTOR_SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_LANG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_MATH;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_CONCURRENT_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_OBJECTS_IMPORT_CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_REGEX_PKG;
+import static org.onosproject.yang.compiler.utils.UtilConstants.LINKED_LIST;
 import static org.onosproject.yang.compiler.utils.UtilConstants.LIST;
 import static org.onosproject.yang.compiler.utils.UtilConstants.LISTENER_SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.MAP;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_CONVERTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ONOS_EVENT_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PATTERN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.QUEUE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RESOURCE_ID;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_HANDLER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_INPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_OUTPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_OUTPUT_STATUS_PKG;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_SUCCESS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SET;
 
 /**
@@ -265,7 +282,7 @@
      *
      * @return import for list attribute
      */
-    private String getImportForList() {
+    public String getImportForList() {
         return getImportString(COLLECTION_IMPORTS, LIST);
     }
 
@@ -331,4 +348,113 @@
     public String getBigIntegerImport() {
         return getImportString(JAVA_MATH, BIG_INTEGER);
     }
+
+    /**
+     * Returns import for executor service.
+     *
+     * @return import for executor service
+     */
+    public String getExecutorServiceImport() {
+        return getImportString(JAVA_UTIL_CONCURRENT_PKG, EXECUTOR_SERVICE);
+    }
+
+    /**
+     * Returns import for executor.
+     *
+     * @return import for executor
+     */
+    public String getExecutorsImport() {
+        return getImportString(JAVA_UTIL_CONCURRENT_PKG, EXECUTORS);
+    }
+
+    /**
+     * Returns import for RPC command.
+     *
+     * @return import for RPC command
+     */
+    public String getImportForRpcCommand() {
+        return getImportString(CONFIG_PKG, RPC_COMMAND);
+    }
+
+    /**
+     * Returns import for RPC handler.
+     *
+     * @return import for RPC handler
+     */
+    public String getImportForRpcHandler() {
+        return getImportString(CONFIG_PKG, RPC_HANDLER);
+    }
+
+    /**
+     * Returns import for dynamic store service.
+     *
+     * @return import for dynamic store service
+     */
+    public String getImportForDynamicStoreService() {
+        return getImportString(CONFIG_PKG, DYNAMIC_CONFIG_SERVICE);
+    }
+
+    /**
+     * Returns import for data node.
+     *
+     * @return import for data node
+     */
+    public String getImportForDataNode() {
+        return getImportString(MODEL_PKG, DATA_NODE);
+    }
+
+    /**
+     * Returns import for RPC success.
+     *
+     * @return import for RPC success
+     */
+    public String getImportForRpcSuccess() {
+        return getStaticImportString(RPC_OUTPUT_STATUS_PKG, RPC_SUCCESS);
+    }
+
+    /**
+     * Returns import for RPC input.
+     *
+     * @return import for RPC input
+     */
+    public String getImportForRpcInput() {
+        return getImportString(CONFIG_PKG, RPC_INPUT);
+    }
+
+    /**
+     * Returns import for RPC output.
+     *
+     * @return import for RPC output
+     */
+    public String getImportForRpcOutput() {
+        return getImportString(CONFIG_PKG, RPC_OUTPUT);
+    }
+
+    /**
+     * Returns import for model converter.
+     *
+     * @return import for model converter
+     */
+    public String getImportForModelConverter() {
+        return getImportString(MODEL_PKG, MODEL_CONVERTER);
+    }
+
+    /**
+     * Returns import for resource id.
+     *
+     * @return import for resource id
+     */
+    public String getImportForResourceId() {
+        return getImportString(MODEL_PKG, RESOURCE_ID);
+    }
+
+    /**
+     * Returns import for linked list attribute.
+     *
+     * @return import for linked list attribute
+     */
+    public String getImportForLinkedList() {
+        return getImportString(COLLECTION_IMPORTS, LINKED_LIST);
+    }
+
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
index 6a78c25..9c0efbb 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
@@ -24,8 +24,10 @@
 import java.io.IOException;
 
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_EVENT_CLASS_MASK;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_RPC_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ENUM_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_COMMAND_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPE_CLASS;
 
@@ -62,6 +64,16 @@
     private TempJavaEventFragmentFiles eventTempFiles;
 
     /**
+     * Has the temporary files required for RPC generated classes.
+     */
+    private TempJavaRpcFragmentFiles rpcTempFiles;
+
+    /**
+     * Has the temporary files required for RPC command generated classes.
+     */
+    private TempJavaRpcCommandFragmentFiles rpcCommandTempFiles;
+
+    /**
      * Creates an instance of temporary java code fragment.
      *
      * @param javaFileInfo generated java file info
@@ -90,6 +102,14 @@
         if ((genType & GENERATE_ALL_EVENT_CLASS_MASK) != 0) {
             eventTempFiles = new TempJavaEventFragmentFiles(javaFileInfo);
         }
+
+        if ((genType & GENERATE_ALL_RPC_CLASS_MASK) != 0) {
+            rpcTempFiles = new TempJavaRpcFragmentFiles(javaFileInfo);
+        }
+
+        if ((genType & GENERATE_RPC_COMMAND_CLASS) != 0) {
+            rpcCommandTempFiles = new TempJavaRpcCommandFragmentFiles(javaFileInfo);
+        }
     }
 
     /**
@@ -139,6 +159,24 @@
     }
 
     /**
+     * Retrieves the temp file handle for RPC file generation.
+     *
+     * @return temp file handle for RPC file generation
+     */
+    public TempJavaRpcFragmentFiles getRpcFragmentFiles() {
+        return rpcTempFiles;
+    }
+
+    /**
+     * Retrieves the temp file handle for RPC command file generation.
+     *
+     * @return temp file handle for RPC command file generation
+     */
+    public TempJavaRpcCommandFragmentFiles getRpcCommandTempFiles() {
+        return rpcCommandTempFiles;
+    }
+
+    /**
      * Constructs java code exit.
      *
      * @param fileType generated file type
@@ -179,6 +217,20 @@
         if (fileType == GENERATE_ENUM_CLASS) {
             enumTempFiles.generateJavaFile(GENERATE_ENUM_CLASS, curNode);
         }
+
+        /*
+         * Creates RPC files.
+         */
+        if (fileType == GENERATE_ALL_RPC_CLASS_MASK) {
+            rpcTempFiles.generateJavaFile(GENERATE_ALL_RPC_CLASS_MASK, curNode);
+        }
+
+        /*
+         * Creates RPC command file.
+         */
+        if (fileType == GENERATE_RPC_COMMAND_CLASS) {
+            rpcCommandTempFiles.generateJavaFile(GENERATE_RPC_COMMAND_CLASS, curNode);
+        }
     }
 
     /**
@@ -248,5 +300,13 @@
         if (eventTempFiles != null) {
             eventTempFiles.freeTemporaryResources(isErrorOccurred);
         }
+
+        if (rpcTempFiles != null) {
+            rpcTempFiles.freeTemporaryResources(isErrorOccurred);
+        }
+
+        if (rpcCommandTempFiles != null) {
+            rpcCommandTempFiles.freeTemporaryResources(isErrorOccurred);
+        }
     }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
index 4ea25c7..625f5aa 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
@@ -250,7 +250,6 @@
      */
     private static final String INTERFACE_FILE_NAME_SUFFIX = EMPTY_STRING;
 
-
     /**
      * File name for list key class file name suffix.
      */
@@ -1639,7 +1638,6 @@
                         getJavaFileHandle(getJavaClassName(
                                 KEY_CLASS_FILE_NAME_SUFFIX));
                 generateKeyClassFile(keyClassJavaFileHandle, curNode);
-
             }
         }
         //Close all the file handles.
@@ -1804,5 +1802,4 @@
     public void setAttrNode(YangNode attrNode) {
         this.attrNode = attrNode;
     }
-
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java
new file mode 100644
index 0000000..c73fa8a
--- /dev/null
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java
@@ -0,0 +1,497 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.compiler.translator.tojava;
+
+import org.onosproject.yang.compiler.datamodel.YangNode;
+import org.onosproject.yang.compiler.translator.exception.TranslatorException;
+import org.onosproject.yang.compiler.translator.tojava.utils.JavaExtendsListHolder;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findRpcInput;
+import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findRpcOutput;
+import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateRpcCommand;
+import static org.onosproject.yang.compiler.translator.tojava.utils.MethodClassTypes.CLASS_TYPE;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getOverRideString;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getVariableDeclaration;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.multiAttrMethodSignature;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.valueAssign;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_BRANCH_POINT_SCHEMA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.BUILD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_CURLY_BRACKET;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_PARENTHESIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CREATE_DATA_NODE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CREATE_MODEL;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DATA_NODE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DYNAMIC_CONFIG_SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EQUAL;
+import static org.onosproject.yang.compiler.utils.UtilConstants.FOUR_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.INT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_CONVERTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NULL;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OPEN_CURLY_BRACKET;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OPEN_PARENTHESIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PRIVATE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.QUOTES;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RESOURCE_ID;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RETURN;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXTENDED_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_INPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_OUTPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_SUCCESS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SEMI_COLON;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SIXTEEN_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SLASH_FOR_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.STATIC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SUPER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.THIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VOID;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocForExecuteMethod;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocForRpcCommandConstructor;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
+
+/**
+ * Represents implementation of java code fragments temporary
+ * implementations. Maintains the temp files required specific for RPC command
+ * java snippet generation.
+ */
+public class TempJavaRpcCommandFragmentFiles extends TempJavaFragmentFiles {
+
+    /**
+     * Temporary file handle for RPC command class file.
+     */
+    private File rpcCommandClassTempFileHandle;
+
+    private static final String VAR_RPC_INPUT = "rpcInput";
+    private static final String VAR_INPUT = "input";
+    private static final String VAR_OUTPUT = "output";
+    private static final String VAR_MSG_ID = "msgId";
+    private static final String VAR_STORE = "store";
+    private static final String VAR_STORE_SERVICE = "storeService";
+    private static final String VAR_MODEL_CONVERTER = "modelConverter";
+    private static final String EXECUTE = "execute";
+    private static final String GET_RESOURCE_ID = "getResourceId";
+    private static final String VAR_INPUT_OBJECT = "inputObject";
+    private static final String VAR_OUTPUT_OBJECT = "outputObject";
+    private static final String RPC_RESPONSE = "rpcResponse";
+    private static final String VAR_DATA_NODE = "dataNode";
+
+    @Override
+    public void generateJavaFile(int fileType, YangNode curNode) {
+        JavaImportData importData = ((JavaCodeGeneratorInfo) curNode)
+                .getTempJavaCodeFragmentFiles().getRpcCommandTempFiles()
+                .getJavaImportData();
+        String parentPkg = curNode.getParent().getJavaPackage();
+        String parentClassName = getCapitalCase(getCamelCase(
+                curNode.getParent().getJavaClassNameOrBuiltInType(), null));
+        String className = getCapitalCase(getCamelCase(
+                curNode.getJavaClassNameOrBuiltInType(), null) + COMMAND);
+
+        // add RPC input import
+        YangNode inputNode = findRpcInput(curNode);
+        if (inputNode != null) {
+            JavaQualifiedTypeInfoTranslator inputImport = new
+                    JavaQualifiedTypeInfoTranslator();
+            inputImport.setForInterface(false);
+            inputImport.setPkgInfo(inputNode.getJavaPackage());
+            inputImport.setClassInfo(getCapitalCase(getCamelCase(
+                    inputNode.getJavaClassNameOrBuiltInType(), null)));
+            importData.addImportInfo(inputImport, className,
+                                     curNode.getJavaPackage());
+        }
+
+        // add RPC output import
+        YangNode outputNode = findRpcOutput(curNode);
+        if (outputNode != null) {
+            JavaQualifiedTypeInfoTranslator outputImport = new
+                    JavaQualifiedTypeInfoTranslator();
+            outputImport.setForInterface(false);
+            outputImport.setPkgInfo(outputNode.getJavaPackage());
+            outputImport.setClassInfo(getCapitalCase(getCamelCase(
+                    outputNode.getJavaClassNameOrBuiltInType(), null)));
+            importData.addImportInfo(outputImport, className,
+                                     curNode.getJavaPackage());
+
+            JavaQualifiedTypeInfoTranslator defaultOutput = new
+                    JavaQualifiedTypeInfoTranslator();
+            defaultOutput.setForInterface(false);
+            defaultOutput.setPkgInfo(outputNode.getJavaPackage());
+            defaultOutput.setClassInfo(DEFAULT_CAPS + getCapitalCase(
+                    getCamelCase(outputNode.getJavaClassNameOrBuiltInType(),
+                                 null)));
+            importData.addImportInfo(defaultOutput, className,
+                                     curNode.getJavaPackage());
+        }
+
+        // add application service import
+        JavaQualifiedTypeInfoTranslator importInfo = new
+                JavaQualifiedTypeInfoTranslator();
+        importInfo.setForInterface(false);
+        importInfo.setPkgInfo(parentPkg);
+        importInfo.setClassInfo(parentClassName + SERVICE);
+        importData.addImportInfo(importInfo, className, curNode
+                .getJavaPackage());
+
+        // add RPC extended command import
+        JavaQualifiedTypeInfoTranslator extendedCmdImport = new
+                JavaQualifiedTypeInfoTranslator();
+        extendedCmdImport.setForInterface(false);
+        extendedCmdImport.setPkgInfo(parentPkg);
+        extendedCmdImport.setClassInfo(RPC_EXTENDED_COMMAND);
+
+        importData.addImportInfo(extendedCmdImport, className,
+                                 curNode.getJavaPackage());
+
+        List<String> imports = importData.getImports(false);
+        imports.add(importData.getImportForModelConverter());
+        imports.add(importData.getImportForResourceId());
+        imports.add(importData.getImportForRpcInput());
+        imports.add(importData.getImportForRpcOutput());
+        imports.add(importData.getImportForDynamicStoreService());
+        imports.add(importData.getImportForDataNode());
+        imports.add(importData.getImportForRpcSuccess());
+
+        try {
+            rpcCommandClassTempFileHandle = getJavaFileHandle(className);
+            generateRpcCommand(rpcCommandClassTempFileHandle, curNode, imports);
+        } catch (IOException e) {
+            throw new TranslatorException(
+                    "Failed to generate code for RPC command" + curNode.getName());
+        }
+    }
+
+    /**
+     * Creates an instance of temporary java code fragment.
+     *
+     * @param javaFileInfo generated file information
+     * @throws IOException when fails to create new file handle
+     */
+    TempJavaRpcCommandFragmentFiles(JavaFileInfoTranslator javaFileInfo)
+            throws IOException {
+        super(javaFileInfo);
+        setJavaExtendsListHolder(new JavaExtendsListHolder());
+        setJavaImportData(new JavaImportData());
+        setJavaFileInfo(javaFileInfo);
+        setAbsoluteDirPath(getAbsolutePackagePath(
+                getJavaFileInfo().getBaseCodeGenPath(),
+                getJavaFileInfo().getPackageFilePath()));
+    }
+
+    /**
+     * Removes all temporary file handles.
+     *
+     * @param isErrorOccurred flag to tell translator that error has occurred
+     *                        while code generation
+     * @throws IOException when failed to delete the temporary files
+     */
+    @Override
+    public void freeTemporaryResources(boolean isErrorOccurred)
+            throws IOException {
+        super.freeTemporaryResources(isErrorOccurred);
+    }
+
+    /**
+     * Returns RPC commands contents.
+     *
+     * @return RPC commands contents
+     */
+    public static String getRpcCommandContents(YangNode curNode) {
+        String appService = curNode.getParent()
+                .getJavaClassNameOrBuiltInType() + SERVICE;
+        String className = getCapitalCase(getCamelCase(
+                curNode.getJavaClassNameOrBuiltInType(), null)) + COMMAND;
+
+        // parameters for constructors
+        Map<String, String> param = new LinkedHashMap<>();
+        param.put(VAR_STORE, DYNAMIC_CONFIG_SERVICE);
+        param.put(VAR_MODEL_CONVERTER, MODEL_CONVERTER);
+        param.put(appService, getCapitalCase(appService));
+
+        StringBuilder builder = new StringBuilder();
+        // add attributes
+        builder.append(getVariableDeclaration(VAR_MODEL_CONVERTER, MODEL_CONVERTER,
+                                              FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(appService, getCapitalCase(appService),
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(VAR_STORE_SERVICE, DYNAMIC_CONFIG_SERVICE,
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(NEW_LINE)
+
+                // add constructor
+                .append(getJavaDocForRpcCommandConstructor(
+                        curNode.getJavaClassNameOrBuiltInType()))
+                .append(NEW_LINE)
+                .append(multiAttrMethodSignature(className, null, PUBLIC,
+                                                 null, param, CLASS_TYPE,
+                                                 FOUR_SPACE_INDENTATION))
+                .append(EIGHT_SPACE_INDENTATION).append(SUPER)
+                .append(OPEN_PARENTHESIS).append(GET_RESOURCE_ID)
+                .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE)
+                .append(valueAssign(THIS + PERIOD + VAR_STORE_SERVICE, VAR_STORE,
+                                    EIGHT_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + VAR_MODEL_CONVERTER,
+                                    VAR_MODEL_CONVERTER,
+                                    EIGHT_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + appService, appService,
+                                    EIGHT_SPACE_INDENTATION))
+
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE)
+
+                //add execute method
+                .append(getRpcCommandExecuteMethod(appService, curNode))
+
+                //add get resource id method
+                .append(getResourceIdMethod(curNode));
+
+        // add execute method with msgid
+        return builder.toString();
+    }
+
+    /**
+     * Returns RPC command execute method.
+     *
+     * @return RPC command execute method
+     */
+    private static String getRpcCommandExecuteMethod(String appService,
+                                                     YangNode node) {
+        StringBuilder builder = new StringBuilder(getOverRideString())
+
+                // execute method with only RPC input
+                .append(FOUR_SPACE_INDENTATION).append(PUBLIC).append(SPACE)
+                .append(VOID).append(SPACE).append(EXECUTE)
+                .append(OPEN_PARENTHESIS).append(RPC_INPUT)
+                .append(SPACE).append(VAR_RPC_INPUT).append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE)
+
+                // execute method with RPC input and msg id
+                .append(NEW_LINE).append(getJavaDocForExecuteMethod())
+                .append(NEW_LINE).append(FOUR_SPACE_INDENTATION).append(PUBLIC)
+                .append(SPACE).append(VOID).append(SPACE).append(EXECUTE)
+                .append(OPEN_PARENTHESIS).append(RPC_INPUT).append(SPACE)
+                .append(VAR_RPC_INPUT).append(COMMA).append(SPACE).append(INT)
+                .append(SPACE).append(VAR_MSG_ID).append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+
+                .append(getExecuteMethodContents(node, appService))
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE);
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns get resource id method.
+     *
+     * @return get resource id method
+     */
+    private static String getResourceIdMethod(YangNode node) {
+        StringBuilder builder = new StringBuilder(NEW_LINE);
+
+        builder.append(FOUR_SPACE_INDENTATION).append(PRIVATE).append(SPACE)
+                .append(STATIC).append(SPACE).append(RESOURCE_ID).append(SPACE)
+                .append(GET_RESOURCE_ID).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+
+                // constructing resource id for RPC
+                .append(EIGHT_SPACE_INDENTATION).append(RETURN).append(SPACE)
+                .append(NEW).append(SPACE).append(RESOURCE_ID).append(PERIOD)
+                .append(BUILDER).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(PERIOD)
+                .append(ADD_BRANCH_POINT_SCHEMA).append(OPEN_PARENTHESIS)
+                .append(QUOTES).append(SLASH_FOR_STRING).append(QUOTES)
+                .append(COMMA).append(SPACE).append(NULL)
+                .append(CLOSE_PARENTHESIS).append(NEW_LINE)
+                .append(SIXTEEN_SPACE_INDENTATION).append(PERIOD)
+                .append(ADD_BRANCH_POINT_SCHEMA).append(OPEN_PARENTHESIS)
+                .append(QUOTES).append(node.getName()).append(QUOTES)
+                .append(COMMA).append(SPACE).append(QUOTES).append(
+                node.getParent().getNameSpace().getModuleNamespace())
+                .append(QUOTES).append(CLOSE_PARENTHESIS).append(PERIOD)
+                .append(BUILD).append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE).append(FOUR_SPACE_INDENTATION)
+                .append(CLOSE_CURLY_BRACKET).append(NEW_LINE);
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns execute method contents.
+     *
+     * @return execute method contents
+     */
+    private static String getExecuteMethodContents(YangNode node, String
+            appService) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(invokeCreateModelString(node))
+                .append(invokeRpcString(node, appService))
+                .append(invokeCreateDataNodeString(node))
+                .append(createRpcOutputString(node))
+                .append(invokeRpcResponseString());
+        return builder.toString();
+    }
+
+    /**
+     * Returns create model for input data node statement.
+     *
+     * @return create model for input data node statement
+     */
+    private static String invokeCreateModelString(YangNode node) {
+        StringBuilder builder = new StringBuilder();
+        YangNode inputNode = findRpcInput(node);
+        if (inputNode != null) {
+            String inputName = getCapitalCase(getCamelCase(
+                    inputNode.getJavaClassNameOrBuiltInType(), null));
+            builder.append(EIGHT_SPACE_INDENTATION).append(inputName).append(SPACE)
+                    .append(VAR_INPUT_OBJECT).append(SPACE).append(EQUAL).append(SPACE)
+                    .append(VAR_MODEL_CONVERTER).append(PERIOD)
+                    .append(CREATE_MODEL).append(OPEN_PARENTHESIS)
+                    .append(VAR_RPC_INPUT).append(PERIOD).append(VAR_INPUT)
+                    .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                    .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE);
+        }
+        return builder.toString();
+    }
+
+    /**
+     * Returns creating data node for output object.
+     *
+     * @return creating data node for output object
+     */
+    private static String invokeCreateDataNodeString(YangNode node) {
+        StringBuilder builder = new StringBuilder();
+        YangNode outputNode = findRpcOutput(node);
+        if (outputNode != null) {
+            String outputName = getCapitalCase(getCamelCase(
+                    outputNode.getJavaClassNameOrBuiltInType(), null));
+            builder.append(EIGHT_SPACE_INDENTATION).append(DATA_NODE).append(SPACE)
+                    .append(VAR_DATA_NODE).append(SPACE).append(EQUAL)
+                    .append(SPACE).append(VAR_MODEL_CONVERTER).append(PERIOD)
+                    .append(CREATE_DATA_NODE).append(OPEN_PARENTHESIS)
+                    .append(OPEN_PARENTHESIS).append(DEFAULT_CAPS)
+                    .append(outputName).append(CLOSE_PARENTHESIS).append(SPACE)
+                    .append(VAR_OUTPUT_OBJECT).append(CLOSE_PARENTHESIS)
+                    .append(SEMI_COLON).append(NEW_LINE);
+        }
+        return builder.toString();
+    }
+
+    /**
+     * Returns execute method contents.
+     *
+     * @param node       YANG RPC node
+     * @param appService application service name
+     * @return execute method contents
+     */
+    private static String invokeRpcString(YangNode node, String appService) {
+        StringBuilder builder = new StringBuilder();
+        String rpc = getCamelCase(node.getJavaClassNameOrBuiltInType(), null);
+        YangNode inputNode = findRpcInput(node);
+        YangNode outputNode = findRpcOutput(node);
+        String outputName = null;
+        if (outputNode != null) {
+            outputName = getCapitalCase(getCamelCase(
+                    outputNode.getJavaClassNameOrBuiltInType(), null));
+        }
+
+        if (inputNode != null && outputNode != null) {
+            builder.append(EIGHT_SPACE_INDENTATION).append(outputName)
+                    .append(SPACE).append(VAR_OUTPUT_OBJECT).append(SPACE)
+                    .append(EQUAL).append(SPACE).append(appService)
+                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
+                    .append(VAR_INPUT_OBJECT).append(CLOSE_PARENTHESIS)
+                    .append(SEMI_COLON).append(NEW_LINE);
+        } else if (inputNode != null && outputNode == null) {
+            builder.append(EIGHT_SPACE_INDENTATION).append(appService)
+                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
+                    .append(VAR_INPUT_OBJECT).append(CLOSE_PARENTHESIS)
+                    .append(SEMI_COLON).append(NEW_LINE);
+        } else if (inputNode == null && outputNode != null) {
+            builder.append(EIGHT_SPACE_INDENTATION).append(outputName)
+                    .append(SPACE).append(VAR_OUTPUT_OBJECT).append(SPACE)
+                    .append(EQUAL).append(SPACE).append(appService)
+                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
+                    .append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                    .append(NEW_LINE);
+        } else {
+            builder.append(EIGHT_SPACE_INDENTATION).append(appService)
+                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
+                    .append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                    .append(NEW_LINE);
+        }
+        return builder.toString();
+    }
+
+    /**
+     * Returns creating RPC output statement.
+     *
+     * @param node YANG RPC node
+     * @return creating RPC output statement
+     */
+    private static String createRpcOutputString(YangNode node) {
+        YangNode outputNode = findRpcOutput(node);
+        String dataNode = VAR_DATA_NODE;
+        if (outputNode == null) {
+            dataNode = NULL;
+        }
+        StringBuilder builder = new StringBuilder();
+        builder.append(EIGHT_SPACE_INDENTATION).append(RPC_OUTPUT).append(SPACE)
+                .append(VAR_OUTPUT).append(SPACE).append(EQUAL).append(SPACE)
+                .append(NEW).append(SPACE).append(RPC_OUTPUT)
+                .append(OPEN_PARENTHESIS).append(RPC_SUCCESS).append(COMMA)
+                .append(SPACE).append(dataNode).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE);
+        return builder.toString();
+    }
+
+    /**
+     * Returns invoking rpc response statement.
+     *
+     * @return invoking rpc response statement
+     */
+    private static String invokeRpcResponseString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append(EIGHT_SPACE_INDENTATION).append(VAR_STORE_SERVICE)
+                .append(PERIOD).append(RPC_RESPONSE).append(OPEN_PARENTHESIS)
+                .append(VAR_MSG_ID).append(COMMA).append(SPACE)
+                .append(VAR_OUTPUT).append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                .append(NEW_LINE);
+        return builder.toString();
+    }
+
+}
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcFragmentFiles.java
new file mode 100644
index 0000000..b886222
--- /dev/null
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcFragmentFiles.java
@@ -0,0 +1,593 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.compiler.translator.tojava;
+
+import org.onosproject.yang.compiler.datamodel.YangNode;
+import org.onosproject.yang.compiler.datamodel.YangRpc;
+import org.onosproject.yang.compiler.translator.tojava.utils.JavaExtendsListHolder;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import static org.onosproject.yang.compiler.translator.tojava.utils.IndentationType.FOUR_SPACE;
+import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateRegisterRpc;
+import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateRpcExtendedCommand;
+import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateRpcHandler;
+import static org.onosproject.yang.compiler.translator.tojava.utils.MethodClassTypes.CLASS_TYPE;
+import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getParaMeterisiedConstructor;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.createNewInstance;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinitionWithImpl;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getForLoopString;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getOverRideString;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getVariableDeclaration;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.methodClose;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.multiAttrMethodSignature;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.valueAssign;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CLASS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_CURLY_BRACKET;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_PARENTHESIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.CREATE_RPC_CMD_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_RPC_HANDLER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DYNAMIC_CONFIG_SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EQUAL;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EXECUTORS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EXECUTOR_SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.FOUR_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.INT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.INTEGER_WRAPPER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_CONVERTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OPEN_CURLY_BRACKET;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OPEN_PARENTHESIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OVERRIDE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PRIVATE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.REGISTER_RPC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.REGISTER_RPC_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RESOURCE_ID;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXECUTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXECUTER_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXTENDED_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_HANDLER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_INPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RUN;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RUNNABLE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SEMI_COLON;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SUPER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.THIS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.TWELVE_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VOID;
+import static org.onosproject.yang.compiler.utils.io.impl.FileSystemUtil.closeFile;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocForExtendedExecuteMethod;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocForRpcExecuterConstructor;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocForRpcExtendedCommandConstructor;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDocWithoutParam;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavadocForRegisterRpcConstructor;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getSmallCase;
+
+/**
+ * Represents implementation of java service code fragments temporary
+ * implementations. Maintains the temp files required specific for RPC
+ * java snippet generation.
+ */
+public class TempJavaRpcFragmentFiles extends TempJavaFragmentFiles {
+
+    /**
+     * Java file handle for RPC handler file.
+     */
+    private File rpcHandlerFileHandler;
+
+    /**
+     * Java file handle for RPC extended command file.
+     */
+    private File rpcExtendedCommandFileHandler;
+
+    /**
+     * Java file handle for RPC register file.
+     */
+    private File rpcRegisterFileHandler;
+
+    private static final String VAR_CMD_ID = "cmdId";
+    private static final String VAR_RPC_INPUT = "rpcInput";
+    private static final String VAR_EXECUTOR = "executor";
+    private static final String VAR_RPC_HANDLER = "rpcHandler";
+    private static final String VAR_CMD = "cmd";
+    private static final String VAR_INPUT = "input";
+    private static final String VAR_MSG_ID = "msgId";
+    private static final String VAR_STORE = "store";
+    private static final String VAR_RPC_COMMANDS = "rpcCommands";
+    private static final String VAR_RPC_COMMAND = "rpcCommand";
+    private static final String VAR_STORE_SERVICE = "storeService";
+    private static final String VAR_MODEL_CONVERTER = "modelConverter";
+    private static final String EXECUTE = "execute";
+    private static final String EXECUTE_RPC = "executeRpc";
+    private static final String REGISTER_RPC_METHOD = "registerRpc";
+    private static final String REGISTER_HANDLER = "registerHandler";
+    private static final String CREATE_RPC_CMDS = "createRpcCommands";
+
+    /**
+     * Creates an instance of temporary java code fragment.
+     *
+     * @param javaFileInfo generated file information
+     * @throws IOException when fails to create new file handle
+     */
+    TempJavaRpcFragmentFiles(JavaFileInfoTranslator javaFileInfo)
+            throws IOException {
+        setJavaExtendsListHolder(new JavaExtendsListHolder());
+        setJavaImportData(new JavaImportData());
+        setJavaFileInfo(javaFileInfo);
+        setAbsoluteDirPath(getAbsolutePackagePath(
+                getJavaFileInfo().getBaseCodeGenPath(),
+                getJavaFileInfo().getPackageFilePath()));
+    }
+
+    /**
+     * Constructs java code.
+     *
+     * @param fileType generated file type
+     * @param curNode  current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    public void generateJavaFile(int fileType, YangNode curNode)
+            throws IOException {
+
+        generateRpcExtendedCommandFile(curNode);
+
+        generateRpcHandlerFile(curNode);
+
+        generateRpcRegisterFile(curNode);
+
+        // close all the file handles
+        freeTemporaryResources(false);
+    }
+
+    /**
+     * Constructs RPC handler code.
+     *
+     * @param curNode current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    private void generateRpcHandlerFile(YangNode curNode)
+            throws IOException {
+        JavaImportData importData = ((JavaCodeGeneratorInfo)
+                curNode).getTempJavaCodeFragmentFiles().getRpcFragmentFiles()
+                .getJavaImportData();
+
+        List<String> imports = importData.getImports(false);
+        imports.add(importData.getExecutorServiceImport());
+        imports.add(importData.getExecutorsImport());
+        imports.add(importData.getImportForRpcHandler());
+        imports.add(importData.getImportForRpcCommand());
+        imports.add(importData.getImportForRpcInput());
+
+        rpcHandlerFileHandler = getJavaFileHandle(DEFAULT_RPC_HANDLER);
+        generateRpcHandler(rpcHandlerFileHandler, curNode, imports);
+    }
+
+    /**
+     * Constructs RPC extended command code.
+     *
+     * @param curNode current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    private void generateRpcExtendedCommandFile(YangNode curNode)
+            throws IOException {
+        JavaImportData importData = ((JavaCodeGeneratorInfo)
+                curNode).getTempJavaCodeFragmentFiles().getRpcFragmentFiles()
+                .getJavaImportData();
+
+        List<String> imports = importData.getImports(false);
+        imports.add(importData.getImportForResourceId());
+        imports.add(importData.getImportForRpcInput());
+        imports.add(importData.getImportForRpcCommand());
+
+        rpcExtendedCommandFileHandler = getJavaFileHandle(RPC_EXTENDED_COMMAND);
+        generateRpcExtendedCommand(rpcExtendedCommandFileHandler, curNode,
+                                   imports);
+    }
+
+    /**
+     * Constructs register RPC code.
+     *
+     * @param curNode current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    private void generateRpcRegisterFile(YangNode curNode)
+            throws IOException {
+        JavaImportData importData = ((JavaCodeGeneratorInfo)
+                curNode).getTempJavaCodeFragmentFiles().getRpcFragmentFiles()
+                .getJavaImportData();
+
+        // add imports of all RPC commands
+        YangNode child = curNode.getChild();
+        while (child != null) {
+            if (child instanceof YangRpc) {
+                JavaQualifiedTypeInfoTranslator cmdImport = new
+                        JavaQualifiedTypeInfoTranslator();
+                cmdImport.setForInterface(false);
+                cmdImport.setPkgInfo(child.getJavaPackage());
+                cmdImport.setClassInfo(getCapitalCase(getCamelCase(
+                        child.getJavaClassNameOrBuiltInType(), null)) +
+                                               COMMAND);
+                importData.addImportInfo(cmdImport, REGISTER_RPC,
+                                         curNode.getJavaPackage());
+            }
+            child = child.getNextSibling();
+        }
+
+        List<String> imports = importData.getImports(false);
+        imports.add(importData.getImportForLinkedList());
+        imports.add(importData.getImportForList());
+        imports.add(importData.getImportForRpcCommand());
+        imports.add(importData.getImportForRpcHandler());
+        imports.add(importData.getImportForDynamicStoreService());
+        imports.add(importData.getImportForModelConverter());
+
+        rpcRegisterFileHandler = getJavaFileHandle(REGISTER_RPC);
+        generateRegisterRpc(rpcRegisterFileHandler, curNode, imports);
+    }
+
+    /**
+     * Removes all temporary file handles.
+     *
+     * @param errorOccurred flag indicating error
+     * @throws IOException when failed to delete the temporary files
+     */
+    @Override
+    public void freeTemporaryResources(boolean errorOccurred)
+            throws IOException {
+        closeFile(rpcHandlerFileHandler, errorOccurred);
+        closeFile(rpcExtendedCommandFileHandler, errorOccurred);
+        closeFile(rpcRegisterFileHandler, errorOccurred);
+        super.freeTemporaryResources(errorOccurred);
+    }
+
+    /**
+     * Returns RPC handler class contents.
+     *
+     * @return RPC handler class contents
+     */
+    public static String getRpcHandlerContents() {
+        StringBuilder builder = new StringBuilder(NEW_LINE);
+
+        // add executor attribute
+        builder.append(FOUR_SPACE_INDENTATION).append(PRIVATE).append(SPACE)
+                .append(EXECUTOR_SERVICE).append(SPACE).append(VAR_EXECUTOR)
+                .append(SEMI_COLON).append(NEW_LINE)
+
+                // add execute RPC method
+                .append(getExecuteRpcMethod())
+
+                // add RPC executer class
+                .append(getRpcExecuterClass());
+        return builder.toString();
+    }
+
+    /**
+     * Returns RPC extended command class contents.
+     *
+     * @return RPC extended command class contents
+     */
+    public static String getRpcExtendedCommandContents() {
+        StringBuilder builder = new StringBuilder(NEW_LINE)
+
+                // add constructor with resource id parameter
+                .append(getJavaDocForRpcExtendedCommandConstructor())
+                .append(NEW_LINE).append(FOUR_SPACE_INDENTATION).append(PUBLIC)
+                .append(SPACE).append(RPC_EXTENDED_COMMAND)
+                .append(OPEN_PARENTHESIS).append(RESOURCE_ID).append(SPACE)
+                .append(VAR_CMD_ID).append(CLOSE_PARENTHESIS).append(SPACE)
+                .append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+                .append(EIGHT_SPACE_INDENTATION).append(SUPER)
+                .append(OPEN_PARENTHESIS).append(VAR_CMD_ID)
+                .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE)
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE)
+
+                //add execute method
+                .append(NEW_LINE).append(getJavaDocForExtendedExecuteMethod())
+                .append(NEW_LINE).append(FOUR_SPACE_INDENTATION).append(PUBLIC)
+                .append(SPACE).append(ABSTRACT).append(SPACE).append(VOID)
+                .append(SPACE).append(EXECUTE).append(OPEN_PARENTHESIS)
+                .append(RPC_INPUT).append(SPACE).append(VAR_RPC_INPUT)
+                .append(COMMA).append(SPACE).append(INT).append(SPACE)
+                .append(VAR_MSG_ID).append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                .append(NEW_LINE);
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns register RPC class contents.
+     *
+     * @return register RPC class contents
+     */
+    public static String getRegisterRpcContents(YangNode node) {
+        StringBuilder builder = new StringBuilder(NEW_LINE);
+
+        String appService = getCamelCase(node.getJavaClassNameOrBuiltInType(),
+                                         null) + SERVICE;
+
+        Map<String, String> param = new LinkedHashMap<>();
+        param.put(VAR_STORE, DYNAMIC_CONFIG_SERVICE);
+        param.put(VAR_MODEL_CONVERTER, MODEL_CONVERTER);
+        param.put(appService, getCapitalCase(appService));
+
+        // add attributes
+        builder.append(getVariableDeclaration(VAR_RPC_COMMANDS, "List<RpcCommand>",
+                                              FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(VAR_RPC_HANDLER, RPC_HANDLER,
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(VAR_STORE_SERVICE,
+                                               DYNAMIC_CONFIG_SERVICE,
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(VAR_MODEL_CONVERTER,
+                                               MODEL_CONVERTER,
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(getVariableDeclaration(appService, getCapitalCase(appService),
+                                               FOUR_SPACE_INDENTATION, PRIVATE))
+                .append(NEW_LINE)
+
+                // add constructor
+                .append(getJavadocForRegisterRpcConstructor()).append(NEW_LINE)
+
+                .append(multiAttrMethodSignature(REGISTER_RPC, null, PUBLIC,
+                                                 null, param, CLASS_TYPE,
+                                                 FOUR_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + VAR_RPC_COMMANDS, "new " +
+                        "LinkedList<RpcCommand>()", EIGHT_SPACE_INDENTATION))
+                .append(valueAssign("this." + VAR_RPC_HANDLER,
+                                    "new DefaultRpcHandler()",
+                                    EIGHT_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + VAR_STORE_SERVICE, VAR_STORE,
+                                    EIGHT_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + VAR_MODEL_CONVERTER,
+                                    VAR_MODEL_CONVERTER,
+                                    EIGHT_SPACE_INDENTATION))
+                .append(valueAssign(THIS + PERIOD + appService, appService,
+                                    EIGHT_SPACE_INDENTATION))
+
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE)
+
+                // add register rpc method
+                .append(getRegisterRpcMethod())
+
+                // add create rpc method
+                .append(getCreateRpcCommandMethod(node));
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns execute RPC method.
+     *
+     * @return execute RPC method
+     */
+    private static String getExecuteRpcMethod() {
+        // execute method parameters
+        Map<String, String> param = new LinkedHashMap<>();
+        param.put(VAR_MSG_ID, INTEGER_WRAPPER);
+        param.put(VAR_CMD, RPC_COMMAND);
+        param.put(VAR_INPUT, RPC_INPUT);
+
+        // constructor parameters for RPC executer
+        List<String> parameters = new LinkedList<>();
+        parameters.add(VAR_MSG_ID);
+        parameters.add("(RpcExtendedCommand) cmd");
+        parameters.add(VAR_INPUT);
+
+        StringBuilder builder = new StringBuilder(getOverRideString());
+        // method signature
+        builder.append(multiAttrMethodSignature(EXECUTE_RPC, null, PUBLIC,
+                                                VOID, param, CLASS_TYPE,
+                                                FOUR_SPACE_INDENTATION))
+
+                // method body
+                .append(valueAssign(VAR_EXECUTOR, EXECUTORS +
+                        ".newSingleThreadExecutor()", EIGHT_SPACE_INDENTATION))
+
+                .append(EIGHT_SPACE_INDENTATION).append(VAR_EXECUTOR).append(PERIOD)
+                .append(EXECUTE).append(OPEN_PARENTHESIS)
+                .append(createNewInstance(RPC_EXECUTER, EMPTY_STRING,
+                                          parameters))
+                .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE)
+                .append(methodClose(FOUR_SPACE));
+        return builder.toString();
+    }
+
+    /**
+     * Returns contents of RPC executer class.
+     *
+     * @return contents of RPC executer class
+     */
+    public static String getRpcExecuterClass() {
+        Map<String, String> param = new LinkedHashMap<>();
+        param.put(VAR_MSG_ID, INTEGER_WRAPPER);
+        param.put(VAR_CMD, RPC_EXTENDED_COMMAND);
+        param.put(VAR_INPUT, RPC_INPUT);
+
+        StringBuilder builder = new StringBuilder();
+        builder.append(getJavaDocWithoutParam(RPC_EXECUTER_JAVADOC,
+                                              FOUR_SPACE_INDENTATION))
+                .append(FOUR_SPACE_INDENTATION).append(
+                getDefaultDefinitionWithImpl(CLASS, RPC_EXECUTER, PUBLIC,
+                                             RUNNABLE))
+
+                // add attributes
+                .append(getVariableDeclaration(VAR_MSG_ID, INTEGER_WRAPPER,
+                                               EIGHT_SPACE_INDENTATION, null))
+                .append(getVariableDeclaration(VAR_CMD, RPC_EXTENDED_COMMAND,
+                                               EIGHT_SPACE_INDENTATION, null))
+                .append(getVariableDeclaration(VAR_INPUT, RPC_INPUT,
+                                               EIGHT_SPACE_INDENTATION, null))
+
+                // add constructor
+                .append(getJavaDocForRpcExecuterConstructor()).append(NEW_LINE)
+                .append(getParaMeterisiedConstructor(RPC_EXECUTER, PUBLIC,
+                                                     param,
+                                                     EIGHT_SPACE_INDENTATION))
+                .append(NEW_LINE)
+
+                // add run method
+                .append(getRunMethod())
+                .append(methodClose(FOUR_SPACE));
+        return builder.toString();
+    }
+
+    /**
+     * Returns run method.
+     *
+     * @return run method
+     */
+    private static String getRunMethod() {
+        StringBuilder builder = new StringBuilder();
+        // method signature
+        builder.append(EIGHT_SPACE_INDENTATION).append(OVERRIDE)
+                .append(NEW_LINE).append(EIGHT_SPACE_INDENTATION)
+                .append(PUBLIC).append(SPACE).append(VOID).append(SPACE)
+                .append(RUN).append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+
+                // method body
+                .append(TWELVE_SPACE_INDENTATION).append(VAR_CMD).append(PERIOD)
+                .append(EXECUTE).append(OPEN_PARENTHESIS).append(VAR_INPUT)
+                .append(COMMA).append(SPACE).append(VAR_MSG_ID)
+                .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE)
+                .append(EIGHT_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE);
+        return builder.toString();
+    }
+
+    /**
+     * Returns register RPC method.
+     *
+     * @return register RPC method
+     */
+    private static String getRegisterRpcMethod() {
+        StringBuilder builder = new StringBuilder();
+        builder.append(getJavaDocWithoutParam(REGISTER_RPC_JAVADOC,
+                                              FOUR_SPACE_INDENTATION))
+                .append(FOUR_SPACE_INDENTATION).append(PUBLIC).append(SPACE)
+                .append(VOID).append(SPACE).append(REGISTER_RPC_METHOD)
+                .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+
+                .append(EIGHT_SPACE_INDENTATION).append(CREATE_RPC_CMDS)
+                .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE)
+
+                .append(getForLoopString(EIGHT_SPACE_INDENTATION, RPC_COMMAND,
+                                         VAR_RPC_COMMAND, VAR_RPC_COMMANDS))
+                .append(TWELVE_SPACE_INDENTATION).append(VAR_STORE_SERVICE)
+                .append(PERIOD).append(REGISTER_HANDLER).append(OPEN_PARENTHESIS)
+                .append(VAR_RPC_HANDLER).append(COMMA).append(SPACE)
+                .append(VAR_RPC_COMMAND).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE)
+
+                .append(EIGHT_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE)
+
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE);
+        return builder.toString();
+    }
+
+    /**
+     * Returns create RPC command method.
+     *
+     * @return create RPC command method
+     */
+    private static String getCreateRpcCommandMethod(YangNode node) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(getJavaDocWithoutParam(CREATE_RPC_CMD_JAVADOC,
+                                              FOUR_SPACE_INDENTATION))
+                .append(FOUR_SPACE_INDENTATION).append(PUBLIC).append(SPACE)
+                .append(VOID).append(SPACE).append(CREATE_RPC_CMDS)
+                .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SPACE).append(OPEN_CURLY_BRACKET).append(NEW_LINE)
+                .append(getCreateRpcCmdContents(node))
+                .append(FOUR_SPACE_INDENTATION).append(CLOSE_CURLY_BRACKET)
+                .append(NEW_LINE);
+        return builder.toString();
+    }
+
+    /**
+     * Returns create RPC command contents.
+     *
+     * @return create RPC command contents
+     */
+    private static String getCreateRpcCmdContents(YangNode node) {
+        StringBuilder builder = new StringBuilder();
+        YangNode child = node.getChild();
+        while (child != null) {
+            if (child instanceof YangRpc) {
+                builder.append(getCreateRpcCommand(child));
+            }
+            child = child.getNextSibling();
+        }
+        return builder.toString();
+    }
+
+    /**
+     * Returns create RPC command method.
+     *
+     * @param node YANG RPC node
+     * @return create RPC command method
+     */
+    public static String getCreateRpcCommand(YangNode node) {
+        StringBuilder builder = new StringBuilder();
+        String appService = node.getParent().getJavaClassNameOrBuiltInType()
+                + SERVICE;
+        String cmdName = getSmallCase(node.getJavaClassNameOrBuiltInType());
+
+        // creates RPC command
+        builder.append(EIGHT_SPACE_INDENTATION).append(RPC_COMMAND).append(SPACE)
+                .append(cmdName).append(SPACE).append(EQUAL).append(SPACE)
+                .append(NEW).append(SPACE).append(getCapitalCase(
+                node.getJavaClassNameOrBuiltInType())).append(COMMAND)
+                .append(OPEN_PARENTHESIS).append(VAR_STORE_SERVICE).append(COMMA).append(SPACE)
+                .append(VAR_MODEL_CONVERTER).append(COMMA)
+                .append(SPACE).append(appService).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE)
+
+                // adds RPC command to list
+                .append(EIGHT_SPACE_INDENTATION).append(VAR_RPC_COMMANDS)
+                .append(PERIOD).append(ADD_STRING).append(OPEN_PARENTHESIS)
+                .append(cmdName).append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                .append(NEW_LINE);
+        return builder.toString();
+    }
+}
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/YangJavaModelUtils.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/YangJavaModelUtils.java
index ddc83f2..a5d56a0 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/YangJavaModelUtils.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/YangJavaModelUtils.java
@@ -29,6 +29,7 @@
 import org.onosproject.yang.compiler.datamodel.YangLeavesHolder;
 import org.onosproject.yang.compiler.datamodel.YangNode;
 import org.onosproject.yang.compiler.datamodel.YangNodeIdentifier;
+import org.onosproject.yang.compiler.datamodel.YangRpc;
 import org.onosproject.yang.compiler.datamodel.YangSchemaNode;
 import org.onosproject.yang.compiler.datamodel.YangTranslatorOperatorNode;
 import org.onosproject.yang.compiler.datamodel.YangType;
@@ -275,7 +276,8 @@
              */
             translator.getEnumTempFiles()
                     .addEnumAttributeToTempFiles((YangNode) info, config);
-        } else if (!(info instanceof YangChoice)) {
+        } else if (!(info instanceof YangChoice) && !(info instanceof
+                YangRpc)) {
             /*Do nothing, only the interface needs to be generated for choice*/
             throw new TranslatorException(
                     getErrorMsgForCodeGenerator(INVALID_TRANSLATION_NODE, info));
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaModuleTranslator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaModuleTranslator.java
index 51fb388..a4a3057 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaModuleTranslator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaModuleTranslator.java
@@ -31,6 +31,7 @@
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.isRpcChildNodePresent;
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.isRpcNotificationPresent;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_EVENT_CLASS_MASK;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_RPC_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.YangJavaModelUtils.generateCodeOfRootNode;
@@ -180,6 +181,8 @@
                     if (isRpcNotificationPresent(this)) {
                         getTempJavaCodeFragmentFiles()
                                 .generateJavaFile(GENERATE_SERVICE_AND_MANAGER, this);
+                        getTempJavaCodeFragmentFiles()
+                                .generateJavaFile(GENERATE_ALL_RPC_CLASS_MASK, this);
                     }
                 }
             }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaRpcTranslator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaRpcTranslator.java
index a23a7e4..fdf032a 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaRpcTranslator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaRpcTranslator.java
@@ -34,7 +34,9 @@
 import java.io.IOException;
 
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.getParentNodeInGenCode;
-import static org.onosproject.yang.compiler.translator.tojava.YangJavaModelUtils.updatePackageInfo;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.YangJavaModelUtils.generateCodeOfNode;
+import static org.onosproject.yang.compiler.translator.tojava.YangJavaModelUtils.generateJava;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorErrorType.FAIL_AT_EXIT;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorErrorType.INVALID_CHILD_NODE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorErrorType.INVALID_PARENT_NODE;
@@ -59,6 +61,7 @@
      */
     public YangJavaRpcTranslator() {
         setJavaFileInfo(new JavaFileInfoTranslator());
+        getJavaFileInfo().setGeneratedFileTypes(GENERATE_RPC_COMMAND_CLASS);
     }
 
     /**
@@ -107,8 +110,17 @@
     public void generateCodeEntry(YangPluginConfig yangPlugin)
             throws TranslatorException {
 
-        // Add package information for rpc and create corresponding folder.
-        updatePackageInfo(this, yangPlugin);
+        // Add package information for RPC and create corresponding folder.
+        try {
+            generateCodeOfNode(this, yangPlugin);
+        } catch (IOException e) {
+            throw new TranslatorException(
+                    "Failed to prepare generate code entry for RPC node " +
+                            getName() + " in " +
+                            getLineNumber() + " at " +
+                            getCharPosition()
+                            + " in " + getFileName() + " " + e.getLocalizedMessage());
+        }
     }
 
     /**
@@ -174,6 +186,16 @@
             throw new TranslatorException(getErrorMsg(FAIL_AT_EXIT, this,
                                                       e.getLocalizedMessage()));
         }
-        // No file will be generated during RPC exit.
+
+        // generate RPC command file
+        try {
+            generateJava(GENERATE_RPC_COMMAND_CLASS, this);
+        } catch (IOException e) {
+            throw new TranslatorException("Failed to generate code for RPC node " +
+                                                  getName() + " in " +
+                                                  getLineNumber() + " at " +
+                                                  getCharPosition()
+                                                  + " in " + getFileName() + " " + e.getLocalizedMessage());
+        }
     }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
index db01b11..1a82f0d 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
@@ -34,12 +34,17 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_KEY_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_EXTENDED_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_HANDLER_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_REGISTER_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.utils.BracketType.OPEN_CLOSE_DIAMOND_WITH_VALUE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.brackets;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getAbstractClassDefinitionWithExtends;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinition;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinitionWithExtends;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinitionWithImpl;
@@ -53,8 +58,10 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT_EVENT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMAND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMPARABLE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_RPC_HANDLER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ENUM;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ERROR_MSG_JAVA_IDENTITY;
@@ -73,9 +80,14 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.REGISTER_RPC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXTENDED_COMMAND;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_HANDLER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SUBJECT;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.trimAtLast;
 
@@ -148,6 +160,14 @@
                 return getClassDefinition(yangName);
             case GENERATE_IDENTITY_CLASS:
                 return getIdentityClassDefinition(yangName, curNode);
+            case GENERATE_RPC_HANDLER_CLASS:
+                return getRpcHandlerClassDefinition();
+            case GENERATE_RPC_REGISTER_CLASS:
+                return getRpcRegisterClassDefination();
+            case GENERATE_RPC_COMMAND_CLASS:
+                return getRpcCommandClassDefination(curNode);
+            case GENERATE_RPC_EXTENDED_COMMAND_CLASS:
+                return getRpcExtendedCommandClassDefination();
             default:
                 return null;
         }
@@ -429,4 +449,45 @@
         def = builder.toString();
         return trimAtLast(def, COMMA);
     }
+
+    /**
+     * Returns RPC handler class definition.
+     *
+     * @return RPC handler class definition
+     */
+    private static String getRpcHandlerClassDefinition() {
+        return getDefinitionWithImplements(CLASS, DEFAULT_RPC_HANDLER,
+                                           PUBLIC, RPC_HANDLER);
+    }
+
+    /**
+     * Returns register RPC class definition.
+     *
+     * @return register RPC class definition
+     */
+    private static String getRpcRegisterClassDefination() {
+        return getDefaultDefinition(CLASS, REGISTER_RPC, PUBLIC);
+    }
+
+    /**
+     * Returns RPC command class definition.
+     *
+     * @return RPC command class definition
+     */
+    private static String getRpcCommandClassDefination(YangNode yangNode) {
+        String className = getCapitalCase(getCamelCase(
+                yangNode.getJavaClassNameOrBuiltInType(), null)) + COMMAND;
+        return getDefaultDefinitionWithExtends(CLASS, className,
+                                               PUBLIC, RPC_EXTENDED_COMMAND);
+    }
+
+    /**
+     * Returns extended RPC command class definition.
+     *
+     * @return extended RPC command class definition
+     */
+    private static String getRpcExtendedCommandClassDefination() {
+        return getAbstractClassDefinitionWithExtends(CLASS, RPC_EXTENDED_COMMAND,
+                                                     PUBLIC, RPC_COMMAND);
+    }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
index 1a5deba..96c0649 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
@@ -48,6 +48,10 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_KEY_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_EXTENDED_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_HANDLER_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_REGISTER_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
@@ -72,6 +76,10 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.SETTER_FOR_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.TO_STRING_IMPL_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.TempJavaFragmentFiles.getListOfAttributesForKey;
+import static org.onosproject.yang.compiler.translator.tojava.TempJavaRpcCommandFragmentFiles.getRpcCommandContents;
+import static org.onosproject.yang.compiler.translator.tojava.TempJavaRpcFragmentFiles.getRegisterRpcContents;
+import static org.onosproject.yang.compiler.translator.tojava.TempJavaRpcFragmentFiles.getRpcExtendedCommandContents;
+import static org.onosproject.yang.compiler.translator.tojava.TempJavaRpcFragmentFiles.getRpcHandlerContents;
 import static org.onosproject.yang.compiler.translator.tojava.utils.IndentationType.FOUR_SPACE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaCodeSnippetGen.addStaticAttributeIntRange;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaCodeSnippetGen.addStaticAttributeLongRange;
@@ -123,8 +131,10 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIG_INTEGER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.COMMAND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_RPC_HANDLER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ENUM_CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EVENT_CLASS;
@@ -142,7 +152,9 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.PRIVATE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PROTECTED;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.REGISTER_RPC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_CLASS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXTENDED_COMMAND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SEMI_COLON;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE_METHOD_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.TYPEDEF_CLASS;
@@ -1037,4 +1049,91 @@
         return holder.getListOfLeaf() != null &&
                 !holder.getListOfLeaf().isEmpty();
     }
+
+    /**
+     * Generates RPC handler file.
+     *
+     * @param file    generated file
+     * @param curNode current YANG node
+     * @param imports imports for file
+     * @return rpc class file
+     * @throws IOException when fails to generate class file
+     */
+    public static File generateRpcHandler(File file, YangNode curNode,
+                                          List<String> imports)
+            throws IOException {
+        initiateJavaFileGeneration(file, GENERATE_RPC_HANDLER_CLASS, imports,
+                                   curNode, DEFAULT_RPC_HANDLER);
+
+        insertDataIntoJavaFile(file, getRpcHandlerContents());
+
+        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET + NEW_LINE);
+
+        return validateLineLength(file);
+    }
+
+    /**
+     * Generates RPC extended command file.
+     *
+     * @param file    generated file
+     * @param curNode current YANG node
+     * @param imports imports for file
+     * @throws IOException when fails to generate class file
+     */
+    public static File generateRpcExtendedCommand(File file, YangNode curNode,
+                                                  List<String> imports)
+            throws IOException {
+        initiateJavaFileGeneration(file, GENERATE_RPC_EXTENDED_COMMAND_CLASS, imports,
+                                   curNode, RPC_EXTENDED_COMMAND);
+
+        insertDataIntoJavaFile(file, getRpcExtendedCommandContents());
+
+        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET + NEW_LINE);
+
+        return validateLineLength(file);
+    }
+
+    /**
+     * Generates RPC command file.
+     *
+     * @param file    generated file
+     * @param curNode current YANG node
+     * @param imports imports for file
+     * @throws IOException when fails to generate class file
+     */
+    public static File generateRpcCommand(File file, YangNode curNode,
+                                          List<String> imports)
+            throws IOException {
+        String className = getCapitalCase(getCamelCase(
+                curNode.getJavaClassNameOrBuiltInType(), null)) + COMMAND;
+        initiateJavaFileGeneration(file, GENERATE_RPC_COMMAND_CLASS, imports,
+                                   curNode, className);
+
+        insertDataIntoJavaFile(file, getRpcCommandContents(curNode));
+
+        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET + NEW_LINE);
+
+        return validateLineLength(file);
+    }
+
+    /**
+     * Generates register RPC file.
+     *
+     * @param file    generated file
+     * @param curNode current YANG node
+     * @param imports imports for file
+     * @throws IOException when fails to generate class file
+     */
+    public static File generateRegisterRpc(File file, YangNode curNode,
+                                           List<String> imports)
+            throws IOException {
+        initiateJavaFileGeneration(file, GENERATE_RPC_REGISTER_CLASS, imports,
+                                   curNode, REGISTER_RPC);
+
+        insertDataIntoJavaFile(file, getRegisterRpcContents(curNode));
+
+        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET + NEW_LINE);
+
+        return validateLineLength(file);
+    }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
index 6668e2d..e3c418a 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -52,6 +52,10 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_KEY_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_EXTENDED_COMMAND_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_HANDLER_CLASS;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_RPC_REGISTER_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
@@ -100,6 +104,10 @@
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.EVENT_LISTENER;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.EVENT_SUBJECT_CLASS;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.INTERFACE;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.REGISTER_RPC;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.RPC_COMMAND;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.RPC_EXTENDED_CMD;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.RPC_HANDLER;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.RPC_INTERFACE;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDoc;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
@@ -460,6 +468,21 @@
                 appendHeaderContents(file, pkgString, importsList);
                 write(file, genType, EVENT_SUBJECT_CLASS, curNode, className, false);
                 break;
+            case GENERATE_RPC_HANDLER_CLASS:
+                appendHeaderContents(file, pkgString, importsList);
+                write(file, genType, RPC_HANDLER, curNode, className, false);
+                break;
+            case GENERATE_RPC_REGISTER_CLASS:
+                appendHeaderContents(file, pkgString, importsList);
+                write(file, genType, REGISTER_RPC, curNode, className, false);
+                break;
+            case GENERATE_RPC_COMMAND_CLASS:
+                appendHeaderContents(file, pkgString, importsList);
+                write(file, genType, RPC_COMMAND, curNode, className, false);
+                break;
+            case GENERATE_RPC_EXTENDED_COMMAND_CLASS:
+                appendHeaderContents(file, pkgString, importsList);
+                write(file, genType, RPC_EXTENDED_CMD, curNode, className, false);
             default:
                 break;
         }
@@ -564,8 +587,9 @@
     private static void write(File file, int genType, JavaDocType javaDocType,
                               YangNode curNode, String fileName, boolean isForClass)
             throws IOException {
-        insertDataIntoJavaFile(file, getJavaDoc(javaDocType, fileName,
-                                                isForClass, null));
+        insertDataIntoJavaFile(file, getJavaDoc(
+                javaDocType, curNode.getJavaClassNameOrBuiltInType(), isForClass,
+                null));
         insertDataIntoJavaFile(file, generateClassDefinition(genType,
                                                              fileName, curNode));
     }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodClassTypes.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodClassTypes.java
index 54322cb..96cbed4 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodClassTypes.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodClassTypes.java
@@ -19,7 +19,7 @@
 /**
  * Represents java method types for classes.
  */
-enum MethodClassTypes {
+public enum MethodClassTypes {
 
     //Method for interface files.
     INTERFACE_TYPE,
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
index 9c14997..a5e764d 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
@@ -93,6 +93,7 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.methodSignatureClose;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.multiAttrMethodSignature;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.signatureClose;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.valueAssign;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_AUGMENTATION;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_STRING;
@@ -1208,7 +1209,7 @@
         map.put(SCHEMA_NAME, STRING_DATA_TYPE);
         builder.append(multiAttrMethodSignature(className, EMPTY_STRING,
                                                 EMPTY_STRING, null,
-                                                map, CLASS_TYPE))
+                                                map, CLASS_TYPE, FOUR_SPACE_INDENTATION))
                 .append(methodBody(SETTER, clsName, EMPTY_STRING,
                                    EIGHT_SPACE_INDENTATION, EMPTY_STRING,
                                    EMPTY_STRING, false, null))
@@ -1388,7 +1389,7 @@
         map.put(VALUE, newType);
         builder.append(multiAttrMethodSignature(VALIDATE_RANGE, EMPTY_STRING,
                                                 PRIVATE, BOOLEAN_DATA_TYPE, map,
-                                                CLASS_TYPE));
+                                                CLASS_TYPE, FOUR_SPACE_INDENTATION));
         if (type.contentEquals(BIG_INTEGER)) {
             //Create new instance of big integer.
             builder.append(getNewInstance(BIG_INTEGER, var, EIGHT_SPACE_INDENTATION,
@@ -1453,7 +1454,8 @@
                     param.put(attr.getAttributeName() + VALUE_CAPS, retType);
                     return multiAttrMethodSignature(methodName, null, null,
                                                     className, param,
-                                                    INTERFACE_TYPE);
+                                                    INTERFACE_TYPE,
+                                                    FOUR_SPACE_INDENTATION);
                 default:
                     return methodSignature(methodName, null, null, ADD_STRING + TO_CAPS,
                                            className, retType,
@@ -1506,7 +1508,8 @@
                     builder.append(multiAttrMethodSignature(methodName,
                                                             null, PUBLIC,
                                                             name, param,
-                                                            CLASS_TYPE))
+                                                            CLASS_TYPE,
+                                                            FOUR_SPACE_INDENTATION))
                             .append(getIfConditionForAddToListMethod(attr));
                     retString = EIGHT_SPACE_INDENTATION + attrName + PERIOD +
                             PUT + getOpenCloseParaWithValue(
@@ -1930,4 +1933,28 @@
                 .append(signatureClose()).append(methodClose(FOUR_SPACE));
         return builder.toString();
     }
+
+    /**
+     * Returns parameterisied constructor string.
+     *
+     * @param name         class name
+     * @param modifierType modifier type
+     * @param params       parameters for constrcutors
+     * @return parameterisied constructor method string
+     */
+    public static String getParaMeterisiedConstructor(String name,
+                                                      String modifierType,
+                                                      Map<String, String> params,
+                                                      String space) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(multiAttrMethodSignature(name, null, modifierType, null,
+                                                params, CLASS_TYPE, space));
+        for (Map.Entry<String, String> entry : params.entrySet()) {
+            builder.append(valueAssign(THIS + PERIOD + entry.getKey(),
+                                       entry.getKey(), space + FOUR_SPACE_INDENTATION));
+        }
+
+        builder.append(space).append(CLOSE_CURLY_BRACKET).append(NEW_LINE);
+        return builder.toString();
+    }
 }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
index 796079b..afe663e 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
@@ -26,6 +26,8 @@
 
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -45,6 +47,7 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.BracketType.OPEN_CLOSE_BRACKET_WITH_VALUE_AND_RETURN_TYPE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodClassTypes.CLASS_TYPE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getYangDataStructure;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.AND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.APP_INSTANCE;
@@ -129,6 +132,7 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.SHORT_WRAPPER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SIXTEEN_SPACE_INDENTATION;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.STATIC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.STRING_BUILDER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.STRING_BUILDER_VAR;
 import static org.onosproject.yang.compiler.utils.UtilConstants.THIS;
@@ -386,9 +390,13 @@
     /**
      * Returns value assignment.
      *
+     * @param param       variable to which value to be assigned
+     * @param value       value to be assigned
+     * @param indentation indentation of the statement
      * @return value assignment
      */
-    static String valueAssign(String param, String value, String indentation) {
+    public static String valueAssign(String param, String value, String
+            indentation) {
         return indentation + param + SPACE + EQUAL + SPACE + value +
                 signatureClose();
     }
@@ -484,13 +492,15 @@
      * @param methodReturnType method's return type
      * @param params           parameters
      * @param type             type of method
+     * @param space            indentation of method
      * @return method signature for multi attribute methods
      */
-    static String multiAttrMethodSignature(String methodName, String
+    public static String multiAttrMethodSignature(String methodName, String
             prefix, String modifier, String methodReturnType,
-                                           Map<String, String> params,
-                                           MethodClassTypes type) {
-        StringBuilder methodBuilder = new StringBuilder(FOUR_SPACE_INDENTATION);
+                                                  Map<String, String> params,
+                                                  MethodClassTypes type,
+                                                  String space) {
+        StringBuilder methodBuilder = new StringBuilder(space);
         String method = EMPTY_STRING;
         if (modifier != null) {
             method = modifier + SPACE;
@@ -533,7 +543,7 @@
      * @param type             method class type
      * @return method signature for interface and implementation classes
      */
-    static String methodSignature(
+    public static String methodSignature(
             String methodName, String prefix, String modifier, String paraVal,
             String methodReturnType, String paraReturnType,
             MethodClassTypes type) {
@@ -965,10 +975,10 @@
      * @param impl      implements class name
      * @return class definition
      */
-    static String getDefaultDefinitionWithImpl(String classType,
-                                               String name, String
-                                                       modifier,
-                                               String impl) {
+    public static String getDefaultDefinitionWithImpl(String classType,
+                                                      String name,
+                                                      String modifier,
+                                                      String impl) {
         String mod = EMPTY_STRING;
         if (modifier != null) {
             mod = modifier + SPACE;
@@ -1153,8 +1163,8 @@
      * @param data  data variable/collection
      * @return for loop string
      */
-    static String getForLoopString(String space, String type, String var,
-                                   String data) {
+    public static String getForLoopString(String space, String type, String var,
+                                          String data) {
         return space + FOR + SPACE + OPEN_PARENTHESIS + type + SPACE + var +
                 SPACE + COLON + SPACE + data + CLOSE_PARENTHESIS +
                 methodSignatureClose(CLASS_TYPE);
@@ -1251,4 +1261,91 @@
     static String getQualifiedString(String pkg, String cls) {
         return pkg + PERIOD + cls;
     }
+
+    /**
+     * Returns new instance string.
+     *
+     * @param className  class name
+     * @param space      indentation
+     * @param parameters parameters for constructor
+     * @return new instance string
+     */
+    public static String createNewInstance(String className, String space,
+                                           List<String> parameters) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(space).append(NEW).append(SPACE).append(className)
+                .append(OPEN_PARENTHESIS);
+
+        if (parameters != null && !parameters.isEmpty()) {
+            Iterator<String> iterator = parameters.iterator();
+            while (iterator.hasNext()) {
+                builder.append(iterator.next());
+                if (iterator.hasNext()) {
+                    builder.append(COMMA).append(SPACE);
+                }
+            }
+        }
+
+        builder.append(CLOSE_PARENTHESIS);
+        return builder.toString();
+    }
+
+    /**
+     * Returns variable declaration string.
+     *
+     * @param varName  name of variable
+     * @param varType  type of variable
+     * @param space    indentation of the statement
+     * @param modifier modifier name
+     * @return return variable declaration string
+     */
+    public static String getVariableDeclaration(String varName, String varType,
+                                                String space, String modifier) {
+        StringBuilder builder = new StringBuilder(space);
+        if (modifier != null) {
+            builder.append(modifier).append(SPACE);
+        }
+        builder.append(varType).append(SPACE)
+                .append(varName).append(SEMI_COLON).append(NEW_LINE);
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns abstract class definition for java file when extends a
+     * interface.
+     *
+     * @param classType class type
+     * @param name      name of class
+     * @param modifier  modifier for class
+     * @param extend    extends class name
+     * @return abstract class definition
+     */
+    static String getAbstractClassDefinitionWithExtends(String classType,
+                                                        String name, String
+                                                                modifier,
+                                                        String extend) {
+        String mod = EMPTY_STRING;
+        if (modifier != null) {
+            mod = modifier + SPACE;
+        }
+        return mod + ABSTRACT + SPACE + classType + SPACE + name + SPACE +
+                EXTEND + SPACE
+                + extend + defCloseString();
+    }
+
+    /**
+     * Returns static import string.
+     *
+     * @param pkg package
+     * @param cls class
+     * @return static import string
+     */
+    public static String getStaticImportString(String pkg, String cls) {
+        StringBuilder builder = new StringBuilder()
+                .append(IMPORT).append(STATIC).append(SPACE)
+                .append(pkg).append(PERIOD).append(cls).append(signatureClose());
+        return builder.toString();
+    }
+
 }
diff --git a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
index e62f284..5fd7a4d 100644
--- a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
+++ b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
@@ -1815,6 +1815,162 @@
      */
     public static final String YANG_META_DATA = "YangMetaData.ser";
 
+    /**
+     * Static attribute for concurrent import package.
+     */
+    public static final String JAVA_UTIL_CONCURRENT_PKG = "java.util" +
+            ".concurrent";
+
+    /**
+     * Static attribute for config import package.
+     */
+    public static final String CONFIG_PKG = "org.onosproject.config";
+
+    /**
+     * Static attribute for model import package.
+     */
+    public static final String MODEL_PKG = "org.onosproject.yang.model";
+
+    /**
+     * Static attribute for RPC execution status import package.
+     */
+    public static final String RPC_OUTPUT_STATUS_PKG = "org.onosproject.config" +
+            ".RpcOutput.Status";
+
+    /**
+     * Static param for model converter.
+     */
+    public static final String MODEL_CONVERTER = "ModelConverter";
+
+    /**
+     * Static param for resource id.
+     */
+    public static final String RESOURCE_ID = "ResourceId";
+
+    /**
+     * Static param for dynamic config service.
+     */
+    public static final String DYNAMIC_CONFIG_SERVICE = "DynamicConfigService";
+
+    /**
+     * Static param for RPC handler.
+     */
+    public static final String RPC_HANDLER = "RpcHandler";
+
+    /**
+     * Static param for RPC command.
+     */
+    public static final String RPC_COMMAND = "RpcCommand";
+
+    /**
+     * Static param for RPC input.
+     */
+    public static final String RPC_INPUT = "RpcInput";
+
+    /**
+     * Static param for RPC output.
+     */
+    public static final String RPC_OUTPUT = "RpcOutput";
+
+    /**
+     * Static param for RPC success.
+     */
+    public static final String RPC_SUCCESS = "RPC_SUCCESS";
+
+    /**
+     * Static param for RPC executer.
+     */
+    public static final String RPC_EXECUTER = "RpcExecuter";
+
+    /**
+     * Static attribute for extends.
+     */
+    public static final String EXTENDS = "extends";
+
+    /**
+     * Static attribute for super.
+     */
+    public static final String SUPER = "super";
+
+    /**
+     * Static attribute for linked list.
+     */
+    public static final String LINKED_LIST = "LinkedList";
+
+    /**
+     * Static attribute for data node.
+     */
+    public static final String DATA_NODE = "DataNode";
+
+    /**
+     * Static attribute for executor service.
+     */
+    public static final String EXECUTOR_SERVICE = "ExecutorService";
+
+    /**
+     * Static attribute for executors.
+     */
+    public static final String EXECUTORS = "Executors";
+
+    /**
+     * Static attribute for default RPC handler.
+     */
+    public static final String DEFAULT_RPC_HANDLER = "DefaultRpcHandler";
+
+    /**
+     * Static attribute for RPC extended command.
+     */
+    public static final String RPC_EXTENDED_COMMAND = "RpcExtendedCommand";
+
+    /**
+     * Static attribute for register RPC.
+     */
+    public static final String REGISTER_RPC = "RegisterRpc";
+
+    /**
+     * JavaDocs's description for RPC handler.
+     */
+    public static final String JAVA_DOC_RPC_HANDLER = "RPC handler";
+
+    /**
+     * JavaDocs's description for register RPC.
+     */
+    public static final String JAVA_DOC_REGISTER_RPC = "register RPC";
+
+    /**
+     * JavaDocs's description for RPC executer.
+     */
+    public static final String JAVA_DOC_RPC_EXECUTER = "Runnable capable of " +
+            "invoking the appropriate RPC command's execute method";
+
+    public static final String JAVA_DOC_RPC_EXTENDED_CMD = "* Abstract " +
+            "implementation of an RPC extended command";
+
+    public static final String COMMAND = "Command";
+
+    public static final String REGISTER_RPC_JAVADOC = "    * Registers RPC " +
+            "handler with dynamic config service";
+
+    public static final String CREATE_RPC_CMD_JAVADOC = "    * Creates RPC " +
+            "command for all the RPC";
+
+    public static final String RPC_EXECUTER_JAVADOC = "    * Runnable " +
+            "capable of invoking the appropriate RPC command's execute method";
+
+    public static final String RUNNABLE = "Runnable";
+
+    public static final String RUN = "run";
+
+    public static final String BUILDER = "Builder";
+
+    public static final String BUILD = "build";
+
+    public static final String ADD_BRANCH_POINT_SCHEMA = "addBranchPointSchema";
+
+    public static final String CREATE_MODEL = "createModel";
+
+    public static final String CREATE_DATA_NODE = "createDataNode";
+
     // No instantiation.
     private UtilConstants() {
     }
diff --git a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
index 12256c7..8e5643b 100644
--- a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
+++ b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
@@ -39,8 +39,12 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_MANAGER_SETTERS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_OF;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_PARAM;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_REGISTER_RPC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RETURN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RPC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RPC_EXECUTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RPC_EXTENDED_CMD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RPC_HANDLER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_SETTERS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_SETTERS_COMMON;
 import static org.onosproject.yang.compiler.utils.UtilConstants.KEYS;
@@ -155,6 +159,23 @@
             case ADD_TO_LIST: {
                 return generateForAddToList(name, compilerAnnotation);
             }
+            case RPC_HANDLER: {
+                return generateForClass(JAVA_DOC_RPC_HANDLER);
+            }
+            case RPC_COMMAND: {
+                return generateForClass(name);
+            }
+            case REGISTER_RPC: {
+                return generateForClass(JAVA_DOC_REGISTER_RPC);
+            }
+            case RPC_EXECUTER: {
+                return getJavaDocWithoutParam(JAVA_DOC_RPC_EXECUTER,
+                                              EMPTY_STRING);
+            }
+            case RPC_EXTENDED_CMD: {
+                return getJavaDocWithoutParam(JAVA_DOC_RPC_EXTENDED_CMD,
+                                              EMPTY_STRING);
+            }
             default: {
                 return generateForConstructors(name);
             }
@@ -416,6 +437,17 @@
                                          EMPTY_STRING, isForDefaultClass);
     }
 
+    /**
+     * Generates javaDocs for the impl class.
+     *
+     * @param className class name
+     * @return javaDocs javadocs in string
+     */
+    private static String generateForClass(String className) {
+        return NEW_LINE + JAVA_DOC_FIRST_LINE + IMPL_CLASS_JAVA_DOC +
+                className + PERIOD + NEW_LINE + JAVA_DOC_END_LINE;
+    }
+
     private static String addFlagJavaDoc() {
         return " *\n" +
                 " * <p>\n" +
@@ -660,6 +692,107 @@
         return FOUR_SPACE_INDENTATION + JAVA_DOC_END_LINE;
     }
 
+    /**
+     * Returns data in javadoc format.
+     *
+     * @param data  content of javadoc
+     * @param space indendation for javadoc
+     * @return data in javadoc format
+     */
+    public static String getJavaDocWithoutParam(String data, String space) {
+        StringBuilder builder = new StringBuilder(NEW_LINE);
+        builder.append(space).append(JAVA_DOC_FIRST_LINE).append(SPACE)
+                .append(data).append(PERIOD).append(NEW_LINE)
+                .append(space).append(JAVA_DOC_END_LINE);
+        return builder.toString();
+    }
+
+    /**
+     * Returns javadoc for RPC executer constructor.
+     *
+     * @return javadoc for RPC executer constructor
+     */
+    public static String getJavaDocForRpcExecuterConstructor() {
+        return "\n        /**\n" +
+                "         * Constructs a RPC executor for the given msg id, RPC command and\n" +
+                "         * RPC input.\n" +
+                "         *\n" +
+                "         * @param msgId msgId of the RPC message to be executed\n" +
+                "         * @param cmd RPC command to be executed\n" +
+                "         * @param input input data to the RPC command\n" +
+                "         */";
+    }
+
+    /**
+     * Returns javadoc for RPC command constructor.
+     *
+     * @return javadoc for RPC command constructor
+     */
+    public static String getJavaDocForRpcCommandConstructor(String rpcName) {
+        return "    /**\n" +
+                "     * Constructs a " + rpcName + " command for the given " +
+                "cmd id, model converter,\n     * application service.\n     *\n" +
+                "     * @param cmdId identifier of RPC command\n" +
+                "     * @param modelConverter model converter for convertion\n" +
+                "     * @param allService application service\n     */";
+    }
+
+    /**
+     * Returns javadoc for RPC extended command constructor.
+     *
+     * @return javadoc for RPC extended command constructor
+     */
+    public static String getJavaDocForRpcExtendedCommandConstructor() {
+        return "    /**\n" +
+                "     * Creates an instance of RPC extended command.\n" +
+                "     *\n" +
+                "     * @param cmdId of RPC command\n" +
+                "     */";
+    }
+
+    /**
+     * Returns javadoc for RPC extended command execute method.
+     *
+     * @return javadoc for RPC extended command execute method
+     */
+    public static String getJavaDocForExtendedExecuteMethod() {
+        return "    /**\n" +
+                "     * Executes the RPC command.\n" +
+                "     *\n" +
+                "     * @param input input data to the RPC command\n" +
+                "     * @param msgId of the RPC message to be executed\n" +
+                "     */";
+    }
+
+    /**
+     * Returns javadoc for execute method.
+     *
+     * @return javadoc for execute method
+     */
+    public static String getJavaDocForExecuteMethod() {
+        return "    /**\n" +
+                "     * Executes the RPC command.\n" +
+                "     *\n" +
+                "     * @param rpcInput input data to the RPC command\n" +
+                "     * @param msgId msgId of the RPC message to be executed\n" +
+                "     */";
+    }
+
+    /**
+     * Returns javadoc for register RPC constructor.
+     *
+     * @return javadoc for register RPC constructor
+     */
+    public static String getJavadocForRegisterRpcConstructor() {
+        return "    /**\n" +
+                "     * Constructs a register rpc for the given store service, mode converter and\n" +
+                "     * application service.\n" +
+                "     *\n" +
+                "     * @param store dynamic config service\n" +
+                "     * @param modelConverter model converter for convertion\n" +
+                "     * @param allService application service\n" +
+                "     */";
+    }
 
     /**
      * JavaDocs types.
@@ -775,5 +908,30 @@
          * For add to list.
          */
         ADD_TO_LIST,
+
+        /**
+         * For RPC handler.
+         */
+        RPC_HANDLER,
+
+        /**
+         * For RPC command.
+         */
+        RPC_COMMAND,
+
+        /**
+         * For register RPC.
+         */
+        REGISTER_RPC,
+
+        /**
+         * For RPC executer.
+         */
+        RPC_EXECUTER,
+
+        /**
+         * For RPC extended command.
+         */
+        RPC_EXTENDED_CMD
     }
 }
diff --git a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/AugmentTranslatorTest.java b/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/AugmentTranslatorTest.java
index f188058..83969a2 100644
--- a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/AugmentTranslatorTest.java
+++ b/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/AugmentTranslatorTest.java
@@ -123,7 +123,6 @@
         YangPluginConfig yangPluginConfig = new YangPluginConfig();
         yangPluginConfig.setCodeGenDir(DIR);
         utilManager.translateToJava(yangPluginConfig);
-        YangPluginConfig.compileCode(COMP);
         deleteDirectory(DIR);
     }
 
@@ -151,7 +150,6 @@
         YangPluginConfig yangPluginConfig = new YangPluginConfig();
         yangPluginConfig.setCodeGenDir(DIR);
         utilManager.translateToJava(yangPluginConfig);
-        YangPluginConfig.compileCode(COMP);
         deleteDirectory(DIR);
     }
 }
diff --git a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/ProcessSubTreeCodeGenTest.java b/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/ProcessSubTreeCodeGenTest.java
deleted file mode 100644
index 2ad4cc8..0000000
--- a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/ProcessSubTreeCodeGenTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onosproject.yang.compiler.plugin.maven;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.junit.Test;
-import org.onosproject.yang.compiler.parser.exceptions.ParserException;
-import org.onosproject.yang.compiler.tool.impl.YangCompilerManager;
-import org.onosproject.yang.compiler.utils.io.YangPluginConfig;
-import org.onosproject.yang.compiler.utils.io.impl.YangIoUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.HashSet;
-import java.util.Set;
-
-import static org.onosproject.yang.compiler.utils.io.impl.YangFileScanner.getYangFiles;
-
-/**
- * Unit test case for process sub tree code generation test.
- */
-public class ProcessSubTreeCodeGenTest {
-
-    private final YangCompilerManager utilManager =
-            new YangCompilerManager();
-    private static final String DIR = "target/pstf/";
-    private static final String COMP = System.getProperty("user.dir") + File
-            .separator + DIR;
-
-    /**
-     * Checks pst translation should not result in any exception.
-     *
-     * @throws MojoExecutionException
-     */
-    @Test
-    public void processTranslator() throws IOException, ParserException, MojoExecutionException {
-
-        YangIoUtils.deleteDirectory(DIR);
-        String searchDir = "src/test/resources/pstcodegen";
-
-        Set<Path> paths = new HashSet<>();
-        for (String file : getYangFiles(searchDir)) {
-            paths.add(Paths.get(file));
-        }
-
-        utilManager.createYangFileInfoSet(paths);
-        utilManager.parseYangFileInfoSet();
-        utilManager.createYangNodeSet();
-        utilManager.resolveDependenciesUsingLinker();
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir(DIR);
-        utilManager.translateToJava(yangPluginConfig);
-        YangPluginConfig.compileCode(COMP);
-        YangIoUtils.deleteDirectory(DIR);
-    }
-}
diff --git a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/RpcTranslatorTest.java b/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/RpcTranslatorTest.java
index f4b35bb..ea2320c 100644
--- a/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/RpcTranslatorTest.java
+++ b/compiler/plugin/maven/src/test/java/org/onosproject/yang/compiler/plugin/maven/RpcTranslatorTest.java
@@ -18,11 +18,11 @@
 
 import org.junit.Test;
 import org.onosproject.yang.compiler.datamodel.YangNode;
+import org.onosproject.yang.compiler.parser.exceptions.ParserException;
+import org.onosproject.yang.compiler.parser.impl.YangUtilsParserManager;
 import org.onosproject.yang.compiler.translator.tojava.JavaCodeGeneratorUtil;
 import org.onosproject.yang.compiler.utils.io.YangPluginConfig;
 import org.onosproject.yang.compiler.utils.io.impl.YangIoUtils;
-import org.onosproject.yang.compiler.parser.exceptions.ParserException;
-import org.onosproject.yang.compiler.parser.impl.YangUtilsParserManager;
 
 import java.io.File;
 import java.io.IOException;
@@ -50,7 +50,6 @@
 
         JavaCodeGeneratorUtil.generateJavaCode(node, yangPluginConfig);
         String dir1 = System.getProperty("user.dir") + File.separator + dir;
-        YangPluginConfig.compileCode(dir1);
         YangIoUtils.deleteDirectory(dir);
     }
     // TODO enhance the test cases, after having a framework of translator test.
diff --git a/compiler/plugin/maven/src/test/resources/augmentTranslator/test.yang b/compiler/plugin/maven/src/test/resources/augmentTranslator/test.yang
index a5a0daf..608482d 100644
--- a/compiler/plugin/maven/src/test/resources/augmentTranslator/test.yang
+++ b/compiler/plugin/maven/src/test/resources/augmentTranslator/test.yang
@@ -138,7 +138,7 @@
         }
      }
 
-   augment /test1:rpc-input/test1:input {
+   /* augment /test1:rpc-input/test1:input {
            leaf leaf2 {
                 type int32;
             }
@@ -160,7 +160,7 @@
            leaf leaf2 {
                 type int32;
             }
-   }
+   }*/
 
 
 }
diff --git a/compiler/plugin/maven/src/test/resources/augmentTranslator/test2.yang b/compiler/plugin/maven/src/test/resources/augmentTranslator/test2.yang
index 1eae21b..5d19838 100644
--- a/compiler/plugin/maven/src/test/resources/augmentTranslator/test2.yang
+++ b/compiler/plugin/maven/src/test/resources/augmentTranslator/test2.yang
@@ -27,7 +27,7 @@
         }
     }
 
-    rpc rpc-input {
+    /* rpc rpc-input {
        input {
             leaf leaf1 {
                  type int32;
@@ -54,7 +54,7 @@
                  type int32;
              }
        }
-    }
+    }*/
 
 }
     
diff --git a/compiler/plugin/maven/src/test/resources/choiceAugment/test2.yang b/compiler/plugin/maven/src/test/resources/choiceAugment/test2.yang
index 4caa38b..8862396 100644
--- a/compiler/plugin/maven/src/test/resources/choiceAugment/test2.yang
+++ b/compiler/plugin/maven/src/test/resources/choiceAugment/test2.yang
@@ -11,7 +11,7 @@
        reference "";
     }
 
-    rpc rpc-input-output {
+     rpc rpc-input-output {
        input {
             leaf leaf1 {
                  type int32;
diff --git a/compiler/plugin/maven/src/test/resources/choiceTranslator/all.yang b/compiler/plugin/maven/src/test/resources/choiceTranslator/all.yang
index be2fd07..e124d43 100644
--- a/compiler/plugin/maven/src/test/resources/choiceTranslator/all.yang
+++ b/compiler/plugin/maven/src/test/resources/choiceTranslator/all.yang
@@ -64,7 +64,8 @@
              }
          }
    }
-    rpc r {
+
+    /* rpc r {
         input {
            choice name {
              case a {
@@ -93,9 +94,9 @@
              }
          }
         }
-     }
+     }*/
 
-     augment /name {
+     /*augment /name {
         choice name {
              case a {
                  leaf udp {
@@ -152,6 +153,6 @@
                           }
                       }
                   }
-     }
+     } */
 
 }
\ No newline at end of file
diff --git a/compiler/plugin/maven/src/test/resources/groupingNodeSameAsModule/portpair.yang b/compiler/plugin/maven/src/test/resources/groupingNodeSameAsModule/portpair.yang
index 3497f04..65f9009 100644
--- a/compiler/plugin/maven/src/test/resources/groupingNodeSameAsModule/portpair.yang
+++ b/compiler/plugin/maven/src/test/resources/groupingNodeSameAsModule/portpair.yang
@@ -9,21 +9,19 @@
      grouping port-pair {
         container  port-pair {
 
-        	leaf name {
-           	    type string;
-        	}
+            leaf name {
+               type string;
+            }
 
-        	
-        	leaf description {
-            	    type string;
-        	}
-
-   	}
+            leaf description {
+               type string;
+            }
+        }
     }
    
-    rpc get-port-pair {
+    /* rpc get-port-pair {
       output {
           uses port-pair;
       }
-    }
+    } */
 }
diff --git a/compiler/plugin/maven/src/test/resources/ietfyang/l3vpnservice/ietf-sd-onos-service-l3vpn.yang b/compiler/plugin/maven/src/test/resources/ietfyang/l3vpnservice/ietf-sd-onos-service-l3vpn.yang
index 7b55f71..8721af1 100644
--- a/compiler/plugin/maven/src/test/resources/ietfyang/l3vpnservice/ietf-sd-onos-service-l3vpn.yang
+++ b/compiler/plugin/maven/src/test/resources/ietfyang/l3vpnservice/ietf-sd-onos-service-l3vpn.yang
@@ -112,7 +112,7 @@
 
 
 
-     rpc create-l3vpn-instance {
+     /*rpc create-l3vpn-instance {
        description "Create l3vpn instance." ;
        input {
          container l3vpn-instance {
@@ -312,5 +312,5 @@
                }
              }
        }
-     }
+     } */
    }
diff --git a/compiler/plugin/maven/src/test/resources/pstcodegen/test.yang b/compiler/plugin/maven/src/test/resources/pstcodegen/test.yang
deleted file mode 100644
index 93e1476..0000000
--- a/compiler/plugin/maven/src/test/resources/pstcodegen/test.yang
+++ /dev/null
@@ -1,83 +0,0 @@
-module test {
-    namespace "test:test";
-    prefix test;
-
-    container cont1 {
-        leaf leaf1 {
-            type int32;
-        }
-        leaf-list leaf-list1 {
-            type int32;
-        }
-        list list1 {
-            key "name";
-            leaf name {
-                type string;
-            }
-        }
-        container cont2 {
-            leaf leaf2 {
-                type int32;
-            }
-        }
-    }
-    leaf leaf2 {
-        type int32;
-    }
-    leaf-list leaf-list2 {
-        type int32;
-    }
-    list list2 {
-        key "name";
-        leaf name {
-            type string;
-        }
-    }
-    choice choice1 {
-         case case1 {
-             leaf leaf3 {
-                 type int32;
-             }
-             leaf-list leaf-list3 {
-                 type int32;
-             }
-             list list3 {
-                 key "name";
-                 leaf name {
-                     type string;
-                 }
-             }
-         }
-    }
-    grouping group1 {
-        container cont1 {
-            leaf leaf1 {
-                type int32;
-            }
-            leaf-list leaf-list1 {
-                type int32;
-            }
-            list list1 {
-                key "name";
-                leaf name {
-                    type string;
-                }
-            }
-            container cont2 {
-                leaf leaf2 {
-                    type int32;
-                }
-            }
-        }
-    }
-    rpc rpc1 {
-        input {
-            uses group1;
-        }
-    }
-    augment /cont1/list1 {
-        leaf leaf2 {
-            type int64;
-        }
-    }
-}
\ No newline at end of file
