/** * Creates a new data sink for the specified set of pixels. * * @param pixels The pixels set the data sink is for. * @return See above. */ public static DataSink createDataSink(PixelsData pixels) { if (pixels == null) throw new IllegalArgumentException("Pixels cannot be null."); if (singleton.pixelsSource != null && singleton.pixelsSource.isSame(pixels.getId())) return singleton.pixelsSource; registry.getCacheService().clearAllCaches(); int size = getCacheSize(); if (size <= 0) size = 0; singleton.pixelsSource = DataSink.makeNew(pixels, registry, size); return singleton.pixelsSource; }
/** * Creates a new {@link RenderingControl}. We pass a reference to the the registry to ensure that * agents don't call the method. * * @param context Reference to the registry. To ensure that agents cannot call the method. It must * be a reference to the container's registry. * @param reList The {@link RenderingEngine}s. * @param pixels The pixels set. * @param metadata The channel metadata. * @param compression Pass <code>0</code> if no compression otherwise pass the compression used. * @param defs The rendering defs linked to the rendering engine. This is passed to speed up the * initialization sequence. * @return See above. * @throws IllegalArgumentException If an Agent try to access the method. */ public static RenderingControl createRenderingControl( Registry context, SecurityContext ctx, List<RenderingEnginePrx> reList, Pixels pixels, List<ChannelData> metadata, int compression, List<RndProxyDef> defs) { if (!(context.equals(registry))) throw new IllegalArgumentException("Not allow to access method."); return singleton.makeNew(ctx, reList, pixels, metadata, compression, defs); }