@Test public void testPublishToStreaming() throws Exception { setUpMultiTenant(); expect(securityService.getOrganization()).andReturn(org1).once(); expect(securityService.getOrganization()).andReturn(org2).once(); expect(securityService.getOrganization()).andReturn(org3).once(); replay(securityService); streamingService.activate(bundleContext, map); assertTrue(streamingService.publishToStreaming()); assertTrue(streamingService.publishToStreaming()); assertFalse(streamingService.publishToStreaming()); }
public boolean publishToStreaming() { String currentOrgId = securityService.getOrganization().getId(); return streamingUrls.containsKey(currentOrgId); }
WowzaStreamingDistributionService extends AbstractDistributionService implements StreamingDistributionService { public boolean publishToStreaming() { String currentOrgId = securityService.getOrganization().getId(); return streamingUrls.containsKey(currentOrgId); } }
WowzaStreamingDistributionService extends AbstractDistributionService implements StreamingDistributionService { public boolean publishToStreaming() { String currentOrgId = securityService.getOrganization().getId(); return streamingUrls.containsKey(currentOrgId); } WowzaStreamingDistributionService(); }
WowzaStreamingDistributionService extends AbstractDistributionService implements StreamingDistributionService { public boolean publishToStreaming() { String currentOrgId = securityService.getOrganization().getId(); return streamingUrls.containsKey(currentOrgId); } WowzaStreamingDistributionService(); String getDistributionType(); void activate(BundleContext bundleContext, Map<String, Object> properties); void modified(BundleContext bundleContext, Map<String, Object> properties); boolean publishToStreaming(); @Override Job distribute(String channelId, MediaPackage mediapackage, Set<String> elementIds); @Override Job distribute(final String channelId, final MediaPackage mediapackage, final String elementId); @Override Job retract(String channelId, MediaPackage mediapackage, String elementId); @Override Job retract(String channelId, MediaPackage mediaPackage, Set<String> elementIds); @Override List<MediaPackageElement> distributeSync(String channelId, MediaPackage mediaPackage, Set<String> elementIds); @Override List<MediaPackageElement> retractSync(String channelId, MediaPackage mediaPackage, Set<String> elementIds); }
WowzaStreamingDistributionService extends AbstractDistributionService implements StreamingDistributionService { public boolean publishToStreaming() { String currentOrgId = securityService.getOrganization().getId(); return streamingUrls.containsKey(currentOrgId); } WowzaStreamingDistributionService(); String getDistributionType(); void activate(BundleContext bundleContext, Map<String, Object> properties); void modified(BundleContext bundleContext, Map<String, Object> properties); boolean publishToStreaming(); @Override Job distribute(String channelId, MediaPackage mediapackage, Set<String> elementIds); @Override Job distribute(final String channelId, final MediaPackage mediapackage, final String elementId); @Override Job retract(String channelId, MediaPackage mediapackage, String elementId); @Override Job retract(String channelId, MediaPackage mediaPackage, Set<String> elementIds); @Override List<MediaPackageElement> distributeSync(String channelId, MediaPackage mediaPackage, Set<String> elementIds); @Override List<MediaPackageElement> retractSync(String channelId, MediaPackage mediaPackage, Set<String> elementIds); static final String JOB_TYPE; static final float DEFAULT_DISTRIBUTE_JOB_LOAD; static final float DEFAULT_RETRACT_JOB_LOAD; static final String DISTRIBUTE_JOB_LOAD_KEY; static final String RETRACT_JOB_LOAD_KEY; }