Examples of OperationRegistry


Examples of javax.media.jai.OperationRegistry

/* 455 */     return new RMIServerProxy(serverName + "::" + renderingID, paramBlock, operationName, renderContext.getRenderingHints());
/*     */   }
/*     */
/*     */   public NegotiableCapabilitySet getClientCapabilities()
/*     */   {
/* 466 */     OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
/*     */
/* 468 */     String modeName = "tileDecoder";
/* 469 */     String[] descriptorNames = registry.getDescriptorNames(modeName);
/* 470 */     TileDecoderFactory tdf = null;
/*     */
/* 476 */     NegotiableCapabilitySet capabilities = new NegotiableCapabilitySet(false);
/*     */
/* 485 */     for (int i = 0; i < descriptorNames.length; i++)
/*     */     {
/* 487 */       Iterator it = registry.getFactoryIterator(modeName, descriptorNames[i]);
/* 488 */       while (it.hasNext()) {
/* 489 */         tdf = (TileDecoderFactory)it.next();
/* 490 */         capabilities.add(tdf.getDecodeCapability());
/*     */       }
/*     */     }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/* 72 */         renderHints = new RenderingHints(key, new Integer(bound));
/* 73 */       else if (!renderHints.containsKey(key)) {
/* 74 */         renderHints.put(key, new Integer(bound));
/*    */       }
/*    */
/* 79 */       OperationRegistry registry = (OperationRegistry)renderHints.get(JAI.KEY_OPERATION_REGISTRY);
/*    */
/* 83 */       RenderedImage image = RIFRegistry.create(registry, "stream", newParamBlock, renderHints);
/*    */
/* 87 */       return image == null ? null : new StreamImage(image, src);
/*    */     } catch (IOException e) {
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/* 111 */       } else if (!hints.containsKey(key)) {
/* 112 */         hints = (RenderingHints)hints.clone();
/* 113 */         hints.put(key, new Integer(bound));
/*     */       }
/*     */
/* 118 */       OperationRegistry registry = (OperationRegistry)hints.get(JAI.KEY_OPERATION_REGISTRY);
/*     */
/* 122 */       RenderedImage image = RIFRegistry.create(registry, "stream", newArgs, hints);
/*     */
/* 125 */       return image == null ? null : new StreamImage(image, src);
/*     */     }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/*      */
/*  823 */         if (checkInvalidRegion)
/*      */         {
/*  825 */           shouldFireEvent = true;
/*      */
/*  828 */           OperationRegistry registry = this.nodeSupport.getRegistry();
/*  829 */           RemoteDescriptor odesc = (RemoteDescriptor)registry.getDescriptor(RemoteDescriptor.class, this.protocolName);
/*      */
/*  835 */           oldPB = ImageUtil.evaluateParameters(oldPB);
/*  836 */           newPB = ImageUtil.evaluateParameters(newPB);
/*      */
/*  839 */           invalidRegion = (Shape)odesc.getInvalidRegion("rendered", oldServerName, oldPB, this.oldHints, newServerName, newPB, this.nodeSupport.getRenderingHints(), this);
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/* 1203 */     return rh == null ? null : (NegotiableCapabilitySet)rh.get(JAI.KEY_NEGOTIATION_PREFERENCES);
/*      */   }
/*      */
/*      */   private NegotiableCapabilitySet negotiate(NegotiableCapabilitySet prefs)
/*      */   {
/* 1210 */     OperationRegistry registry = this.nodeSupport.getRegistry();
/*      */
/* 1212 */     NegotiableCapabilitySet serverCap = null;
/*      */
/* 1215 */     RemoteDescriptor descriptor = (RemoteDescriptor)registry.getDescriptor(RemoteDescriptor.class, this.protocolName);
/*      */
/* 1218 */     if (descriptor == null) {
/* 1219 */       Object[] msgArg0 = { new String(this.protocolName) };
/* 1220 */       MessageFormat formatter = new MessageFormat("");
/* 1221 */       formatter.setLocale(Locale.getDefault());
/* 1222 */       formatter.applyPattern(JaiI18N.getString("RemoteJAI16"));
/* 1223 */       throw new ImagingException(formatter.format(msgArg0));
/*      */     }
/*      */
/* 1226 */     int count = 0;
/* 1227 */     int numRetries = getNumRetries();
/* 1228 */     int retryInterval = getRetryInterval();
/*      */
/* 1230 */     Exception rieSave = null;
/* 1231 */     while (count++ < numRetries) {
/*      */       try {
/* 1233 */         serverCap = descriptor.getServerCapabilities(this.serverName);
/*      */       }
/*      */       catch (RemoteImagingException rie)
/*      */       {
/* 1237 */         System.err.println(JaiI18N.getString("RemoteJAI24"));
/* 1238 */         rieSave = rie;
/*      */         try
/*      */         {
/* 1241 */           Thread.sleep(retryInterval);
/*      */         }
/*      */         catch (InterruptedException ie) {
/* 1244 */           sendExceptionToListener(JaiI18N.getString("Generic5"), new ImagingException(JaiI18N.getString("Generic5"), ie));
/*      */         }
/*      */       }
/*      */
/*      */     }
/*      */
/* 1250 */     if ((serverCap == null) && (count > numRetries)) {
/* 1251 */       sendExceptionToListener(JaiI18N.getString("RemoteJAI18"), rieSave);
/*      */     }
/*      */
/* 1255 */     RemoteRIF rrif = (RemoteRIF)registry.getFactory("remoteRendered", this.protocolName);
/*      */
/* 1258 */     return RemoteJAI.negotiate(prefs, serverCap, rrif.getClientCapabilities());
/*      */   }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/* 744 */     this.negotiated = negotiate(preferences);
/*     */   }
/*     */
/*     */   private NegotiableCapabilitySet negotiate(NegotiableCapabilitySet prefs)
/*     */   {
/* 749 */     OperationRegistry registry = this.nodeSupport.getRegistry();
/*     */
/* 751 */     NegotiableCapabilitySet serverCap = null;
/*     */
/* 754 */     RemoteDescriptor descriptor = (RemoteDescriptor)registry.getDescriptor(RemoteDescriptor.class, this.protocolName);
/*     */
/* 757 */     if (descriptor == null) {
/* 758 */       Object[] msgArg0 = { new String(this.protocolName) };
/* 759 */       MessageFormat formatter = new MessageFormat("");
/* 760 */       formatter.setLocale(Locale.getDefault());
/* 761 */       formatter.applyPattern(JaiI18N.getString("RemoteJAI16"));
/* 762 */       throw new RuntimeException(formatter.format(msgArg0));
/*     */     }
/*     */
/* 765 */     int count = 0;
/* 766 */     int numRetries = getNumRetries();
/* 767 */     int retryInterval = getRetryInterval();
/*     */
/* 769 */     Exception rieSave = null;
/* 770 */     while (count++ < numRetries) {
/*     */       try {
/* 772 */         serverCap = descriptor.getServerCapabilities(this.serverName);
/*     */       }
/*     */       catch (RemoteImagingException rie)
/*     */       {
/* 776 */         System.err.println(JaiI18N.getString("RemoteJAI24"));
/* 777 */         rieSave = rie;
/*     */         try
/*     */         {
/* 780 */           Thread.sleep(retryInterval);
/*     */         }
/*     */         catch (InterruptedException ie) {
/* 783 */           sendExceptionToListener(JaiI18N.getString("Generic5"), new ImagingException(JaiI18N.getString("Generic5"), ie));
/*     */         }
/*     */       }
/*     */
/*     */     }
/*     */
/* 789 */     if ((serverCap == null) && (count > numRetries)) {
/* 790 */       sendExceptionToListener(JaiI18N.getString("RemoteJAI18"), rieSave);
/*     */     }
/*     */
/* 795 */     RemoteRIF rrif = (RemoteRIF)registry.getFactory("remoteRenderable", this.protocolName);
/*     */
/* 798 */     return RemoteJAI.negotiate(prefs, serverCap, rrif.getClientCapabilities());
/*     */   }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/*     */
/* 135 */     ParameterBlock pb = new ParameterBlock();
/* 136 */     pb.addSource(paramBlock.getSource(0));
/* 137 */     pb.add(stream).add(format).add(param);
/*     */
/* 140 */     OperationRegistry registry = renderHints == null ? null : (OperationRegistry)renderHints.get(JAI.KEY_OPERATION_REGISTRY);
/*     */
/* 143 */     PlanarImage im = new FileStoreImage(RIFRegistry.create(registry, "encode", pb, renderHints), stream);
/*     */
/* 146 */     return im;
/*     */   }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

/* 1339 */     return id;
/*      */   }
/*      */
/*      */   public synchronized NegotiableCapabilitySet getServerCapabilities()
/*      */   {
/* 1348 */     OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
/*      */
/* 1354 */     String modeName = "tileEncoder";
/* 1355 */     String[] descriptorNames = registry.getDescriptorNames(modeName);
/* 1356 */     TileEncoderFactory tef = null;
/*      */
/* 1359 */     NegotiableCapabilitySet capabilities = new NegotiableCapabilitySet(false);
/*      */
/* 1363 */     for (int i = 0; i < descriptorNames.length; i++)
/*      */     {
/* 1365 */       Iterator it = registry.getFactoryIterator(modeName, descriptorNames[i]);
/* 1366 */       while (it.hasNext()) {
/* 1367 */         tef = (TileEncoderFactory)it.next();
/* 1368 */         capabilities.add(tef.getEncodeCapability());
/*      */       }
/*      */     }
View Full Code Here

Examples of javax.media.jai.OperationRegistry

    /**
     * Manually registers the operation in the registry in case it's not already there
     */
    public static void register() {
        try {
            final OperationRegistry opr = JAI.getDefaultInstance().getOperationRegistry();
            if(opr.getDescriptor(RenderedRegistryMode.MODE_NAME, "GTCrop") == null) {
                Registry.registerRIF(JAI.getDefaultInstance(), new GTCropDescriptor(),
                        new GTCropCRIF(), Registry.GEOTOOLS_PRODUCT);
            }
        } catch (Exception e) {
            if (LOGGER.isLoggable(Level.FINE)) {
View Full Code Here

Examples of javax.media.jai.OperationRegistry

    /**
     * Manually registers the operation in the registry in case it's not already there
     */
    public static void register() {
        try {
            final OperationRegistry opr = JAI.getDefaultInstance().getOperationRegistry();
            if(opr.getDescriptor(RenderedRegistryMode.MODE_NAME, OPERATION_NAME) == null) {
                Registry.registerRIF(JAI.getDefaultInstance(), new ColorIndexerDescriptor(),
                        new ColorIndexerCRIF(), "org.geotools");
            }
        } catch (Exception e) {
            if (LOGGER.isLoggable(Level.FINE)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.