Package java.rmi

Examples of java.rmi.UnexpectedException


              }
            catch (ApplicationException ex)
              {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return passCorbaValueTypeArray(arg0);
              }
View Full Code Here


              }
            catch (ApplicationException ex)
              {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return passCorbaObject(arg0);
              }
View Full Code Here

              }
            catch (ApplicationException ex)
              {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return passArrayOfRemotes(arg0);
              }
View Full Code Here

              }
            catch (ApplicationException ex)
              {
                in = ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return passReturnRemote(arg0);
              }
View Full Code Here

              }
            catch (ApplicationException ex)
              {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return getEgo();
              }
View Full Code Here

              }
            catch (ApplicationException ex)
              {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String id = in.read_string();
                throw new UnexpectedException(id);
              }
            catch (RemarshalException ex)
              {
                return passCollection(arg0);
              }
View Full Code Here

  void clearSnapshot(final KeyValueSkipListSet ss)
  throws UnexpectedException {
    this.lock.writeLock().lock();
    try {
      if (this.snapshot != ss) {
        throw new UnexpectedException("Current snapshot is " +
          this.snapshot + ", was passed " + ss);
      }
      // OK. Passed in snapshot is same as current snapshot.  If not-empty,
      // create a new snapshot and let the old one go.
      if (!ss.isEmpty()) {
View Full Code Here

                    }
                }

                if (!ok) {
                    // rmi.3E=Remote method threw unexpected exception
                    resEx = new UnexpectedException(Messages.getString("rmi.3E"), resEx); //$NON-NLS-1$
                }
            }

            // Add our stacktrace to the stacktrace of exception received
            StackTraceElement[] origST = resEx.getStackTrace();
            StackTraceElement[] curST = (new Exception()).getStackTrace();
            StackTraceElement[] resST =
                    new StackTraceElement[origST.length + curST.length];
            System.arraycopy(origST, 0, resST, 0, origST.length);
            System.arraycopy(curST, 0, resST, origST.length, curST.length);
            resEx.setStackTrace(resST);

            // logs exception from server
            if (UnicastRef.clientCallsLog.isLoggable(RMILog.BRIEF)) {
                UnicastRef.clientCallsLog.log(RMILog.BRIEF,
                        Messages.getString("rmi.log.92", conn), resEx); //$NON-NLS-1$
            }
            throw resEx;
        } else {
            // rmi.3F=Not Exception type thrown: {0}
            throw new UnexpectedException(Messages.getString("rmi.3F", obj)); //$NON-NLS-1$
        }
    }
View Full Code Here

        } else if (orig instanceof RuntimeException) {
            throw (RuntimeException) orig;
        }

        if (orig instanceof Exception)
            return new UnexpectedException( orig.toString(), (Exception)orig );
        else
            return new UnexpectedException( orig.toString());
    }
View Full Code Here

        InputStream is = (InputStream)ae.getInputStream() ;
        String excName = ae.getId() ;
        int index = findDeclaredException( excName ) ;
        if (index < 0) {
            excName = is.read_string() ;
            Exception res = new UnexpectedException( excName ) ;
            res.initCause( ae ) ;
            return res ;
        }

        return rws[index].read( is ) ;
    }
View Full Code Here

TOP

Related Classes of java.rmi.UnexpectedException

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.