Package jade.core

Examples of jade.core.IMTPException


      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof Exception) {
          throw (Exception)result;
        }
        else {
          throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
        }
      }
      return (byte[])result;
    }
    catch(ServiceException se) {
      throw new IMTPException("Unable to access remote node", se);
    }
  }
View Full Code Here


    if ((result != null) && (result instanceof Throwable)) {
      if (result instanceof IMTPException) {
        throw (IMTPException) result;
      }
      else {
        throw new IMTPException("Unexpected exception in remote site.", (Throwable) result);
      }
    }
  }
View Full Code Here

      if ((result != null) && (result instanceof Throwable)) {
        if (result instanceof IMTPException) {
          throw (IMTPException) result;
        }
        else {
          throw new IMTPException("Unexpected exception in remote site.", (Throwable) result);
        }
      }
    }
    catch (ServiceException se) {
      throw new IMTPException("Unexpected error contacting remote node.", se);
    }
  }
View Full Code Here

      NodeDescriptor dsc = mainContainer.getContainerNode(new ContainerID(nodeID, null));
      dsc.getNode().ping(false);
    }
    catch (NotFoundException nfe) {
      // Node unknown! This should never happen. DO as if it was unreachable
      throw new IMTPException("Unknown node");
    }
  }
View Full Code Here

      if (r.getCode() == Command.ERROR) {
        if (!((Boolean) r.getParamAt(0)).booleanValue()) {
          // Unexpected exception thrown in the remote site
          String msg = new String("Exception "+(String) r.getParamAt(1)+" occurred in remote site processing command "+c.getCode()+". "+(String) r.getParamAt(2));
          logger.log(Logger.SEVERE,msg);
          throw new IMTPException(msg);
        }
        else if (((String) r.getParamAt(1)).equals("jade.core.IMTPException")) {
          throw new IMTPException((String) r.getParamAt(2));
        }
      }
      return r;
    }
    catch (ICPException icpe) {
      // The destination is unreachable.
      if (timeout == 0) {
        // The command can't be postponed
        throw new IMTPException("Destination unreachable", icpe);
      }
      else {
        logger.log(Logger.WARNING, "Dispatch failed. Command postponed. "+icpe.getMessage());
        // FIXME: if timeout > 0 we should add a timer
        postpone(c);
        return null;
      }
    }
    catch (LEAPSerializationException lse) {
      throw new IMTPException("Serialization error", lse);
    }
    finally {
      enableFlush();
    }
  }
View Full Code Here

  }

  public Object accept(HorizontalCommand cmd) throws IMTPException {
    try {
      if(terminating) {
        throw new IMTPException("Dead node");
      }
      return serveHorizontalCommand(cmd);
    }
    catch(ServiceException se) {
      throw new IMTPException("Service Error", se);
    }
  }
View Full Code Here

        }
        else if(result instanceof JADESecurityException) {
          throw (JADESecurityException)result;
        }
        else {
          throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
        }
      }
    }
    catch(ServiceException se) {
      throw new IMTPException("Unable to access remote node", se);
    }
  }
View Full Code Here

        }
        else if(result instanceof MTPException) {
          throw (MTPException)result;
        }
        else {
          throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
        }
      }
    }
    catch(ServiceException se) {
      throw new IMTPException("Unable to access remote node", se);
    }
  }
View Full Code Here

        }
        else if(result instanceof NotFoundException) {
          throw (NotFoundException)result;
        }
        else {
          throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
        }
      }
      return (ContainerID)result;
    }
    catch(ServiceException se) {
      throw new IMTPException("Unable to access remote node", se);
    }
  }
View Full Code Here

        }
        else if(result instanceof ServiceException) {
          throw (ServiceException)result;
        }
        else {
          throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
        }
      }
      return (MTPDescriptor)result;
    }
    catch(ServiceException se) {
      throw new IMTPException("Unable to access remote node", se);
    }
  }
View Full Code Here

TOP

Related Classes of jade.core.IMTPException

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.