Package javax.media.jai.remote

Examples of javax.media.jai.remote.RemoteImagingException


/*      */     try
/*      */     {
/*  573 */       this.remoteImage.createRenderableOp(this.id, operationName, newPB);
/*      */     } catch (RemoteException e) {
/*  575 */       String message = JaiI18N.getString("RMIServerProxy8");
/*  576 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
/*      */
/*  583 */     int size = getNumSources();
/*      */
/*  585 */     for (int i = 0; i < size; i++)
/*      */     {
/*  587 */       Vector sources = paramBlock.getSources();
/*  588 */       Object source = sources.elementAt(i);
/*      */
/*  590 */       if ((source instanceof RMIServerProxy)) {
/*      */         try {
/*  592 */           RMIServerProxy rop = (RMIServerProxy)source;
/*      */
/*  594 */           if (rop.serverName.equals(this.serverName))
/*  595 */             this.remoteImage.setRenderableSource(this.id, rop.getRMIID(), i);
/*      */           else {
/*  597 */             this.remoteImage.setRenderableSource(this.id, rop.getRMIID(), rop.serverName, rop.operationName, i);
/*      */           }
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  602 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  603 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*  612 */       else if ((source instanceof RenderableOp)) {
/*      */         try {
/*  614 */           this.remoteImage.setRenderableSource(this.id, (RenderableOp)source, i);
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  618 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  619 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*  628 */       else if ((source instanceof RenderedImage)) {
/*      */         try {
/*  630 */           this.remoteImage.setRenderableSource(this.id, new SerializableRenderedImage((RenderedImage)source), i);
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  636 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  637 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*      */
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  650 */       this.remoteImage.incrementRefCount(this.id);
/*      */     } catch (RemoteException e) {
/*  652 */       String message = JaiI18N.getString("RMIServerProxy9");
/*  653 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
/*      */
/*  666 */     if (isRender)
/*      */       try {
/*  668 */         this.renderingID = this.remoteImage.getRendering(this.id, SerializerFactory.getState(rc, null));
/*      */
/*  673 */         this.remoteImage.incrementRefCount(this.renderingID);
/*      */       } catch (RemoteException e) {
/*  675 */         String message = JaiI18N.getString("RMIServerProxy10");
/*  676 */         this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */       }
/*      */   }
View Full Code Here


/*  704 */       if (serverName == null) {
/*      */         try {
/*  706 */           serverName = InetAddress.getLocalHost().getHostAddress();
/*      */         } catch (Exception e) {
/*  708 */           String message = JaiI18N.getString("RMIServerProxy11");
/*  709 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*      */
/*  717 */       String serviceName = new String("rmi://" + serverName + "/" + "JAIRMIRemoteServer1.1");
/*      */
/*  722 */       this.remoteImage = null;
/*      */       try {
/*  724 */         this.remoteImage = ((ImageServer)Naming.lookup(serviceName));
/*      */       } catch (Exception e) {
/*  726 */         String message = JaiI18N.getString("RMIServerProxy12");
/*  727 */         this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */       }
/*      */
/*      */     }
/*      */
/*  734 */     return this.remoteImage;
View Full Code Here

/*      */     {
/*  748 */       this.id = this.remoteImage.getRemoteID();
/*  749 */       return this.id;
/*      */     } catch (Exception e) {
/*  751 */       String message = JaiI18N.getString("RMIServerProxy13");
/*  752 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
/*      */
/*  758 */     return this.id;
/*      */   }
View Full Code Here

/*  768 */     getImageServer(this.serverName);
/*      */     try {
/*  770 */       cbr = this.remoteImage.getRendering(getRMIID());
/*      */     } catch (RemoteException re) {
/*  772 */       String message = JaiI18N.getString("RMIServerProxy10");
/*  773 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/*  779 */     return cbr;
/*      */   }
View Full Code Here

/*  818 */       SerializableState cmState = this.remoteImage.getColorModel(this.id);
/*  819 */       layout.setColorModel((ColorModel)cmState.getObject());
/*  820 */       return layout;
/*      */     } catch (RemoteException re) {
/*  822 */       String message = JaiI18N.getString("RMIServerProxy14");
/*  823 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/*  826 */     return null;
/*      */   }
View Full Code Here

/*      */         {
/*      */           try
/*      */           {
/*  867 */             tdf = (TileDecoderFactory)factory.newInstance();
/*      */           } catch (InstantiationException ie) {
/*  869 */             throw new RemoteImagingException(ImageUtil.getStackTraceString(ie));
/*      */           } catch (IllegalAccessException iae) {
/*  871 */             throw new RemoteImagingException(ImageUtil.getStackTraceString(iae));
/*      */           }
/*      */         }
/*      */       }
/*      */
/*  876 */       if (tdf == null) {
/*  877 */         throw new RemoteImagingException(JaiI18N.getString("RMIServerProxy0"));
/*      */       }
/*      */
/*  881 */       TileCodecDescriptor tcd = (TileCodecDescriptor)this.registry.getDescriptor("tileDecoder", capabilityName);
/*      */
/*  885 */       if ((!tcd.includesSampleModelInfo()) || (!tcd.includesLocationInfo()))
/*      */       {
/*  887 */         throw new RemoteImagingException(JaiI18N.getString("RMIServerProxy1"));
/*      */       }
/*      */
/*  891 */       ParameterListDescriptor pld = tcd.getParameterListDescriptor("tileDecoder");
/*      */
/*  894 */       tcpl = new TileCodecParameterList(capabilityName, new String[] { "tileDecoder" }, pld);
/*      */
/*  900 */       if (pld != null)
/*      */       {
/*  902 */         String[] paramNames = pld.getParamNames();
/*      */
/*  905 */         if (paramNames != null) {
/*  906 */           for (int i = 0; i < paramNames.length; i++) { String currParam = paramNames[i];
/*      */             Object currValue;
/*      */             try { currValue = codecCap.getNegotiatedValue(currParam); }
/*      */             catch (IllegalArgumentException iae)
/*      */             {
/*  913 */               continue;
/*      */             }
/*      */
/*  916 */             tcpl.setParameter(currParam, currValue);
/*      */           }
/*      */         }
/*      */       }
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  924 */       if (codecCap != null) {
/*  925 */         byte[] ctile = this.remoteImage.getCompressedTile(this.id, tileX, tileY);
/*      */
/*  928 */         ByteArrayInputStream stream = new ByteArrayInputStream(ctile);
/*  929 */         TileDecoder decoder = tdf.createDecoder(stream, tcpl);
/*      */         try {
/*  931 */           return decoder.decode();
/*      */         } catch (IOException ioe) {
/*  933 */           throw new RemoteImagingException(ImageUtil.getStackTraceString(ioe));
/*      */         }
/*      */       }
/*      */
/*  937 */       SerializableState rp = this.remoteImage.getTile(this.id, tileX, tileY);
/*  938 */       return (Raster)rp.getObject();
/*      */     }
/*      */     catch (RemoteException e) {
/*  941 */       String message = JaiI18N.getString("RMIServerProxy15");
/*  942 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
/*      */
/*  948 */     return null;
/*      */   }
View Full Code Here

/*  956 */       return Image.UndefinedProperty;
/*      */     }
/*      */     catch (RemoteException re)
/*      */     {
/*  960 */       String message = JaiI18N.getString("RMIServerProxy16");
/*  961 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/*  967 */     return Image.UndefinedProperty;
/*      */   }
View Full Code Here

/*      */     try
/*      */     {
/*  980 */       return this.remoteImage.getPropertyNames(this.id);
/*      */     } catch (RemoteException re) {
/*  982 */       String message = JaiI18N.getString("RMIServerProxy17");
/*  983 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/*  989 */     return null;
/*      */   }
View Full Code Here

/*      */     try
/*      */     {
/* 1019 */       dstRect = this.remoteImage.mapSourceRect(this.id, sourceRect, sourceIndex);
/*      */     } catch (RemoteException re) {
/* 1021 */       String message = JaiI18N.getString("RMIServerProxy18");
/* 1022 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/* 1028 */     return dstRect;
/*      */   }
View Full Code Here

/*      */     try
/*      */     {
/* 1056 */       srcRect = this.remoteImage.mapDestRect(this.id, destRect, sourceIndex);
/*      */     } catch (RemoteException re) {
/* 1058 */       String message = JaiI18N.getString("RMIServerProxy18");
/* 1059 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
/*      */
/* 1065 */     return srcRect;
/*      */   }
View Full Code Here

TOP

Related Classes of javax.media.jai.remote.RemoteImagingException

Copyright © 2018 www.massapicom. 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.