@Test public void testUnknownType() { try { runnerFactory.newLiveActivityRunner("foo", liveActivity, filesystem, configuration, runnerListener, liveActivityRuntime); Assert.fail(); } catch (Exception e) { } }
@Override public StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity, InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration, LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime) { String bareActivityType = activityType; VersionRange versionRange = null; int versionRangePos = bareActivityType.indexOf(VERSION_RANGE_SEPARATOR); if (versionRangePos != -1) { versionRange = VersionRange.parseVersionRange(bareActivityType.substring(versionRangePos + 1)); bareActivityType = bareActivityType.substring(0, versionRangePos); } bareActivityType = bareActivityType.toLowerCase(); ActivityWrapperFactory wrapperFactory = getActivityWrapperFactory(bareActivityType, versionRange); if (wrapperFactory != null) { ActivityWrapper wrapper = wrapperFactory.newActivityWrapper(liveActivity, activityFilesystem, configuration, liveActivityRuntime); StandardLiveActivityRunner activeLiveActivity = new StandardLiveActivityRunner(liveActivity, wrapper, activityFilesystem, configuration, liveActivityRunnerListener, liveActivityRuntime); return activeLiveActivity; } else { String message = String.format("Unsupported activity type %s for activity %s", activityType.toString(), liveActivity.getUuid()); liveActivityRuntime.getSpaceEnvironment().getLog().warn(message); throw new SimpleInteractiveSpacesException(message); } }
StandardLiveActivityRunnerFactory implements LiveActivityRunnerFactory { @Override public StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity, InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration, LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime) { String bareActivityType = activityType; VersionRange versionRange = null; int versionRangePos = bareActivityType.indexOf(VERSION_RANGE_SEPARATOR); if (versionRangePos != -1) { versionRange = VersionRange.parseVersionRange(bareActivityType.substring(versionRangePos + 1)); bareActivityType = bareActivityType.substring(0, versionRangePos); } bareActivityType = bareActivityType.toLowerCase(); ActivityWrapperFactory wrapperFactory = getActivityWrapperFactory(bareActivityType, versionRange); if (wrapperFactory != null) { ActivityWrapper wrapper = wrapperFactory.newActivityWrapper(liveActivity, activityFilesystem, configuration, liveActivityRuntime); StandardLiveActivityRunner activeLiveActivity = new StandardLiveActivityRunner(liveActivity, wrapper, activityFilesystem, configuration, liveActivityRunnerListener, liveActivityRuntime); return activeLiveActivity; } else { String message = String.format("Unsupported activity type %s for activity %s", activityType.toString(), liveActivity.getUuid()); liveActivityRuntime.getSpaceEnvironment().getLog().warn(message); throw new SimpleInteractiveSpacesException(message); } } }
StandardLiveActivityRunnerFactory implements LiveActivityRunnerFactory { @Override public StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity, InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration, LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime) { String bareActivityType = activityType; VersionRange versionRange = null; int versionRangePos = bareActivityType.indexOf(VERSION_RANGE_SEPARATOR); if (versionRangePos != -1) { versionRange = VersionRange.parseVersionRange(bareActivityType.substring(versionRangePos + 1)); bareActivityType = bareActivityType.substring(0, versionRangePos); } bareActivityType = bareActivityType.toLowerCase(); ActivityWrapperFactory wrapperFactory = getActivityWrapperFactory(bareActivityType, versionRange); if (wrapperFactory != null) { ActivityWrapper wrapper = wrapperFactory.newActivityWrapper(liveActivity, activityFilesystem, configuration, liveActivityRuntime); StandardLiveActivityRunner activeLiveActivity = new StandardLiveActivityRunner(liveActivity, wrapper, activityFilesystem, configuration, liveActivityRunnerListener, liveActivityRuntime); return activeLiveActivity; } else { String message = String.format("Unsupported activity type %s for activity %s", activityType.toString(), liveActivity.getUuid()); liveActivityRuntime.getSpaceEnvironment().getLog().warn(message); throw new SimpleInteractiveSpacesException(message); } } StandardLiveActivityRunnerFactory(InteractiveSpacesEnvironment spaceEnvironment); }
StandardLiveActivityRunnerFactory implements LiveActivityRunnerFactory { @Override public StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity, InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration, LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime) { String bareActivityType = activityType; VersionRange versionRange = null; int versionRangePos = bareActivityType.indexOf(VERSION_RANGE_SEPARATOR); if (versionRangePos != -1) { versionRange = VersionRange.parseVersionRange(bareActivityType.substring(versionRangePos + 1)); bareActivityType = bareActivityType.substring(0, versionRangePos); } bareActivityType = bareActivityType.toLowerCase(); ActivityWrapperFactory wrapperFactory = getActivityWrapperFactory(bareActivityType, versionRange); if (wrapperFactory != null) { ActivityWrapper wrapper = wrapperFactory.newActivityWrapper(liveActivity, activityFilesystem, configuration, liveActivityRuntime); StandardLiveActivityRunner activeLiveActivity = new StandardLiveActivityRunner(liveActivity, wrapper, activityFilesystem, configuration, liveActivityRunnerListener, liveActivityRuntime); return activeLiveActivity; } else { String message = String.format("Unsupported activity type %s for activity %s", activityType.toString(), liveActivity.getUuid()); liveActivityRuntime.getSpaceEnvironment().getLog().warn(message); throw new SimpleInteractiveSpacesException(message); } } StandardLiveActivityRunnerFactory(InteractiveSpacesEnvironment spaceEnvironment); @Override void startup(); @Override void shutdown(); @Override StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity,
      InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration,
      LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime); @Override StandardLiveActivityRunner newLiveActivityRunner(InstalledLiveActivity liveActivity,
      InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration,
      LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime); @Override String getConfiguredType(Configuration configuration); @Override void registerActivityWrapperFactory(ActivityWrapperFactory factory); @Override void unregisterActivityWrapperFactory(ActivityWrapperFactory factory); }
StandardLiveActivityRunnerFactory implements LiveActivityRunnerFactory { @Override public StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity, InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration, LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime) { String bareActivityType = activityType; VersionRange versionRange = null; int versionRangePos = bareActivityType.indexOf(VERSION_RANGE_SEPARATOR); if (versionRangePos != -1) { versionRange = VersionRange.parseVersionRange(bareActivityType.substring(versionRangePos + 1)); bareActivityType = bareActivityType.substring(0, versionRangePos); } bareActivityType = bareActivityType.toLowerCase(); ActivityWrapperFactory wrapperFactory = getActivityWrapperFactory(bareActivityType, versionRange); if (wrapperFactory != null) { ActivityWrapper wrapper = wrapperFactory.newActivityWrapper(liveActivity, activityFilesystem, configuration, liveActivityRuntime); StandardLiveActivityRunner activeLiveActivity = new StandardLiveActivityRunner(liveActivity, wrapper, activityFilesystem, configuration, liveActivityRunnerListener, liveActivityRuntime); return activeLiveActivity; } else { String message = String.format("Unsupported activity type %s for activity %s", activityType.toString(), liveActivity.getUuid()); liveActivityRuntime.getSpaceEnvironment().getLog().warn(message); throw new SimpleInteractiveSpacesException(message); } } StandardLiveActivityRunnerFactory(InteractiveSpacesEnvironment spaceEnvironment); @Override void startup(); @Override void shutdown(); @Override StandardLiveActivityRunner newLiveActivityRunner(String activityType, InstalledLiveActivity liveActivity,
      InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration,
      LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime); @Override StandardLiveActivityRunner newLiveActivityRunner(InstalledLiveActivity liveActivity,
      InternalLiveActivityFilesystem activityFilesystem, LiveActivityConfiguration configuration,
      LiveActivityRunnerListener liveActivityRunnerListener, LiveActivityRuntime liveActivityRuntime); @Override String getConfiguredType(Configuration configuration); @Override void registerActivityWrapperFactory(ActivityWrapperFactory factory); @Override void unregisterActivityWrapperFactory(ActivityWrapperFactory factory); static final int ACTIVITY_WRAPPER_FACTORY_RETRIES_DEFAULT; static final int ACTIVITY_WRAPPER_FACTORY_RETRY_DELAY_DEFAULT; static final Version DEFAULT_FACTORY_VERSION; static final char VERSION_RANGE_SEPARATOR; }