Package javax.media.jai.remote

Examples of javax.media.jai.remote.RemoteImagingException


  try {
      return remoteImage.getPropertyNames(id);
  } catch (RemoteException re) {
            String message = JaiI18N.getString("RMIServerProxy17");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, re),
                                   this, false);
//      throw new RemoteImagingException(ImageUtil.getStackTraceString(re));
  }

        return null;
View Full Code Here


  try {
      dstRect = remoteImage.mapSourceRect(id, sourceRect, sourceIndex);
  } catch (RemoteException re) {
            String message = JaiI18N.getString("RMIServerProxy18");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, re),
                                   this, false);
//      throw new RemoteImagingException(ImageUtil.getStackTraceString(re));
  }

  return dstRect;
View Full Code Here

  try {
      srcRect = remoteImage.mapDestRect(id, destRect, sourceIndex);
  } catch (RemoteException re) {
            String message = JaiI18N.getString("RMIServerProxy18");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, re),
                                   this, false);
//      throw new RemoteImagingException(ImageUtil.getStackTraceString(re));
  }

  return srcRect;
View Full Code Here

  try {
      remoteImage.setServerNegotiatedValues(id, negotiatedValues);
  } catch (RemoteException re) {
            String message = JaiI18N.getString("RMIServerProxy19");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, re),
                                   this, false);
//      throw new RemoteImagingException(ImageUtil.getStackTraceString(re));
  }
    }
View Full Code Here

        } catch(RemoteException e) {
            ImagingListener listener =
                ImageUtil.getImagingListener((RenderingHints)null);
            String message = JaiI18N.getString("RMIImageImpl0");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, e),
                                   this, false);
/*
            e.printStackTrace();
            throw new RuntimeException(JaiI18N.getString("RMIImageImpl0") +
                                       e.getMessage());
View Full Code Here

/*     */     try {
/*  83 */       Method m1 = ssi.getMethod("getSupportedClasses", null);
/*  84 */       classes = (Class[])m1.invoke(null, null);
/*     */     } catch (NoSuchMethodException e) {
/*  86 */       String message = JaiI18N.getString("SerializerImpl1");
/*  87 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */     catch (IllegalAccessException e)
/*     */     {
/*  91 */       String message = JaiI18N.getString("SerializerImpl1");
/*  92 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */     catch (InvocationTargetException e)
/*     */     {
/*  96 */       String message = JaiI18N.getString("SerializerImpl1");
/*  97 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */
/* 102 */     boolean supportsSubclasses = false;
/*     */     try {
/* 104 */       Method m2 = ssi.getMethod("permitsSubclasses", null);
/* 105 */       Boolean b = (Boolean)m2.invoke(null, null);
/* 106 */       supportsSubclasses = b.booleanValue();
/*     */     } catch (NoSuchMethodException e) {
/* 108 */       String message = JaiI18N.getString("SerializerImpl4");
/* 109 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */     catch (IllegalAccessException e)
/*     */     {
/* 113 */       String message = JaiI18N.getString("SerializerImpl4");
/* 114 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */     catch (InvocationTargetException e)
/*     */     {
/* 118 */       String message = JaiI18N.getString("SerializerImpl4");
/* 119 */       listener.errorOccurred(message, new RemoteImagingException(message, e), SerializerImpl.class, false);
/*     */     }
/*     */
/* 124 */     int numClasses = classes.length;
/* 125 */     for (int i = 0; i < numClasses; i++) {
/* 126 */       Serializer s = new SerializerImpl(ssi, classes[i], supportsSubclasses);
View Full Code Here

/*     */
/* 150 */       this.ctor = ssi.getConstructor(paramTypes);
/*     */     } catch (NoSuchMethodException e) {
/* 152 */       String message = this.theClass.getName() + ": " + JaiI18N.getString("SerializerImpl2");
/*     */
/* 154 */       sendExceptionToListener(message, new RemoteImagingException(message, e));
/*     */     }
/*     */   }
View Full Code Here

/*     */     try {
/* 167 */       state = this.ctor.newInstance(new Object[] { this.theClass, o, h });
/*     */     } catch (InstantiationException e) {
/* 169 */       String message = this.theClass.getName() + ": " + JaiI18N.getString("SerializerImpl3");
/*     */
/* 171 */       sendExceptionToListener(message, new RemoteImagingException(message, e));
/*     */     }
/*     */     catch (IllegalAccessException e) {
/* 174 */       String message = this.theClass.getName() + ": " + JaiI18N.getString("SerializerImpl3");
/*     */
/* 176 */       sendExceptionToListener(message, new RemoteImagingException(message, e));
/*     */     }
/*     */     catch (InvocationTargetException e) {
/* 179 */       String message = this.theClass.getName() + ": " + JaiI18N.getString("SerializerImpl3");
/*     */
/* 181 */       sendExceptionToListener(message, new RemoteImagingException(message, e));
/*     */     }
/*     */
/* 185 */     return (SerializableState)state;
/*     */   }
View Full Code Here

/*      */     {
/*  225 */       SerializableState rhs = SerializerFactory.getState(hints, null);
/*  226 */       this.remoteImage.createRenderedOp(this.id, operationName, newPB, rhs);
/*      */     } catch (RemoteException e) {
/*  228 */       String message = JaiI18N.getString("RMIServerProxy5");
/*  229 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
/*      */
/*  238 */     int size = getNumSources();
/*  239 */     for (int i = 0; i < size; i++)
/*      */     {
/*  241 */       RenderedImage source = getSource(i);
/*      */
/*  243 */       if ((source instanceof RMIServerProxy)) {
/*      */         try {
/*  245 */           RMIServerProxy rop = (RMIServerProxy)source;
/*  246 */           if (rop.serverName.equalsIgnoreCase(this.serverName))
/*      */           {
/*  248 */             this.remoteImage.setRenderedSource(this.id, rop.getRMIID(), i);
/*      */           }
/*  250 */           else this.remoteImage.setRenderedSource(this.id, rop.getRMIID(), rop.serverName, rop.operationName, i);
/*      */
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  257 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  258 */           this.listener.errorOccurred(message, new RemoteImagingException(e), this, false);
/*      */         }
/*      */
/*      */       }
/*  264 */       else if ((source instanceof RenderedOp))
/*      */       {
/*  269 */         RenderedOp rop = (RenderedOp)source;
/*  270 */         RenderedImage rendering = rop.getRendering();
/*  271 */         if (!(rendering instanceof Serializable))
/*  272 */           rendering = new SerializableRenderedImage(rendering);
/*      */         try
/*      */         {
/*  275 */           this.remoteImage.setRenderedSource(this.id, rendering, i);
/*      */         } catch (RemoteException e) {
/*  277 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  278 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*  287 */       else if ((source instanceof RenderedImage)) {
/*      */         try {
/*  289 */           if ((source instanceof Serializable))
/*  290 */             this.remoteImage.setRenderedSource(this.id, source, i);
/*      */           else {
/*  292 */             this.remoteImage.setRenderedSource(this.id, new SerializableRenderedImage(source), i);
/*      */           }
/*      */
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  299 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  300 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*      */
/*      */     }
View Full Code Here

/*  400 */         oldRenderingID = this.remoteImage.handleEvent(opID, idx, shapeState, oldSrc);
/*      */       }
/*      */       catch (RemoteException re)
/*      */       {
/*  406 */         String message = JaiI18N.getString("RMIServerProxy7");
/*  407 */         this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */       }
/*      */
/*  414 */       oldRMISP.id = oldRenderingID;
/*  415 */       this.id = opID;
/*      */     }
/*      */     else
/*      */     {
/*  426 */       Object oldValue = null; Object newValue = null;
/*      */
/*  428 */       if (propName.equals("operationname"))
/*      */       {
/*  430 */         oldValue = event.getOldValue();
/*  431 */         newValue = event.getNewValue();
/*      */       }
/*  433 */       else if (propName.equals("parameterblock"))
/*      */       {
/*  435 */         ParameterBlock oldPB = (ParameterBlock)event.getOldValue();
/*  436 */         Vector oldSrcs = oldPB.getSources();
/*  437 */         oldPB.removeSources();
/*      */
/*  439 */         ParameterBlock newPB = (ParameterBlock)event.getNewValue();
/*  440 */         Vector newSrcs = newPB.getSources();
/*  441 */         newPB.removeSources();
/*      */
/*  444 */         JAIRMIUtil.checkClientParameters(oldPB, this.serverName);
/*  445 */         JAIRMIUtil.checkClientParameters(newPB, this.serverName);
/*      */
/*  447 */         oldPB.setSources(JAIRMIUtil.replaceSourcesWithId(oldSrcs, this.serverName));
/*      */
/*  449 */         newPB.setSources(JAIRMIUtil.replaceSourcesWithId(newSrcs, this.serverName));
/*      */
/*  452 */         oldValue = oldPB;
/*  453 */         newValue = newPB;
/*      */       }
/*  455 */       else if (propName.equals("sources"))
/*      */       {
/*  457 */         Vector oldSrcs = (Vector)event.getOldValue();
/*  458 */         Vector newSrcs = (Vector)event.getNewValue();
/*      */
/*  460 */         oldValue = JAIRMIUtil.replaceSourcesWithId(oldSrcs, this.serverName);
/*      */
/*  462 */         newValue = JAIRMIUtil.replaceSourcesWithId(newSrcs, this.serverName);
/*      */       }
/*  465 */       else if (propName.equals("parameters"))
/*      */       {
/*  467 */         Vector oldParameters = (Vector)event.getOldValue();
/*  468 */         Vector newParameters = (Vector)event.getNewValue();
/*      */
/*  471 */         JAIRMIUtil.checkClientParameters(oldParameters, this.serverName);
/*  472 */         JAIRMIUtil.checkClientParameters(newParameters, this.serverName);
/*      */
/*  474 */         oldValue = oldParameters;
/*  475 */         newValue = newParameters;
/*      */       }
/*  477 */       else if (propName.equals("renderinghints"))
/*      */       {
/*  479 */         RenderingHints oldRH = (RenderingHints)event.getOldValue();
/*  480 */         RenderingHints newRH = (RenderingHints)event.getNewValue();
/*      */
/*  482 */         oldValue = SerializerFactory.getState(oldRH, null);
/*  483 */         newValue = SerializerFactory.getState(newRH, null);
/*      */       } else {
/*  485 */         throw new RemoteImagingException(JaiI18N.getString("RMIServerProxy4"));
/*      */       }
/*      */
/*  489 */       Long oldRenderingID = null;
/*      */       try
/*      */       {
/*  492 */         oldRenderingID = this.remoteImage.handleEvent(opID, propName, oldValue, newValue);
/*      */
/*  497 */         this.remoteImage.incrementRefCount(oldRenderingID);
/*      */       } catch (RemoteException re) {
/*  499 */         String message = JaiI18N.getString("RMIServerProxy7");
/*  500 */         this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */       }
/*      */
/*  506 */       oldRMISP.id = oldRenderingID;
/*  507 */       this.id = opID;
/*      */     }
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.