- /**
- * Create rpc implementation capable of handling RPC for monitoring and notifications
- * even before the schemas of remote device are downloaded.
- */
- static NetconfDeviceRpc getRpcForInitialization(final NetconfDeviceCommunicator listener,
- final boolean notificationSupport) {
- final BaseSchema baseSchema = resolveBaseSchema(notificationSupport);
-
- return new NetconfDeviceRpc(baseSchema.getSchemaContext(), listener,
- new NetconfMessageTransformer(baseSchema.getMountPointContext(), false, baseSchema));
- }
-
- private static BaseSchema resolveBaseSchema(final boolean notificationSupport) {
- return notificationSupport ? BaseSchema.BASE_NETCONF_CTX_WITH_NOTIFICATIONS : BaseSchema.BASE_NETCONF_CTX;
- }
-