code: public RuntimeManager build(KnowledgeRuntimeManagerType type, String identifier) {
          final RuntimeManager runtimeManager;
          final RuntimeEnvironment runtimeEnvironment = _runtimeEnvironmentBuilder.build();
          final RemoteManifest remoteManifest = RemoteManifest.removeFromEnvironment(runtimeEnvironment.getEnvironment());
          if (remoteManifest != null) {
              runtimeManager = new RemoteRuntimeManager(remoteManifest.buildConfiguration(), identifier);
          } else {
              switch (type) {
              case SINGLETON:
                  runtimeManager = _runtimeManagerFactory.newSingletonRuntimeManager(runtimeEnvironment, identifier);
                  break;
              case PER_REQUEST:
                  runtimeManager = _runtimeManagerFactory.newPerRequestRuntimeManager(runtimeEnvironment, identifier);
                  break;
              case PER_PROCESS_INSTANCE:
                  runtimeManager = _runtimeManagerFactory.newPerProcessInstanceRuntimeManager(runtimeEnvironment, identifier);
                  break;
              default:
                  runtimeManager = null;
                  break;
              }
          }
          return runtimeManager;
      }
docs: Builds a RuntimeManager.
  
  @param type type
  @param identifier identifier
  @return a RuntimeManager