Examples of UnreachableException


Examples of jade.core.UnreachableException

                    myHelper = (MessagingSlice) getSlice(myHelperName);
                }

                deliverUntilOK(msg, receiverID);
            } catch (IMTPException imtpe) {
                throw new UnreachableException("Unreachable network node", imtpe);
            } catch (ServiceException se) {
                throw new UnreachableException("Unreachable service slice:", se);
            }
        }
View Full Code Here

Examples of jade.core.UnreachableException

   */
  private byte[] dispatchDirectly(List destTAs, byte[] commandPayload, boolean requireFreshConnection) throws UnreachableException {
   
    // Loop on destinaltion addresses (No need to check again
    // that the list of addresses is not-null and not-empty)
    UnreachableException lastException = null;
    for (int i = 0; i < destTAs.size(); i++) {
      try {
        return send((TransportAddress) destTAs.get(i), commandPayload, requireFreshConnection);
      }
      catch (UnreachableException ue) {
View Full Code Here

Examples of jade.core.UnreachableException

      }
      else    // UnreachableException (the Command was sent to the router,
        // but the final destination was unreachable from there)
        // --> throw an UnreachableException
        if (exception.equals("jade.core.UnreachableException")) {
          throw new UnreachableException((String) response.getParamAt(1));
        }
    }
  }
View Full Code Here

Examples of jade.core.UnreachableException

   
    // Get the ICPs suitable for the given TransportAddress.
    List list = (List) icps.get(ta.getProto().toLowerCase());
   
    if (list == null) {
      throw new UnreachableException("no ICP suitable for protocol "+ta.getProto()+".");
     
    }
   
    ICPException lastException = null;
    for (int i = 0; i < list.size(); i++) {
      try {
        return ((ICP) list.get(i)).deliverCommand(ta, commandPayload, requireFreshConnection);
      }
      catch (ICPException icpe) {
        lastException = icpe;
        // DEBUG
        // Print a warning and try next address
        //System.out.println("Warning: can't deliver command to "+ta+". "+icpe.getMessage());
      }
    }
   
    throw new UnreachableException("ICPException delivering command to address "+ta+".", lastException);
  }
View Full Code Here

Examples of jade.core.UnreachableException

        List   destTAs = (List) command.getParamAt(1);
        String origin = (String) command.getParamAt(2);
       
        if (origin.equals(name)) {
          // The forwarding mechanism is looping.
          response = buildExceptionResponse(new UnreachableException("destination unreachable (and forward loop)."));
        }
        else {
          try {
            response = dispatchSerializedCommand(destTAs, originalPayload, false, origin);
          }
View Full Code Here

Examples of jade.core.UnreachableException

        else if(name.equals(AgentManagementSlice.KILL_CONTAINER)) {
          handleKillContainer(cmd);
        }
      }
      catch(IMTPException imtpe) {
        cmd.setReturnValue(new UnreachableException("Remote container is unreachable", imtpe));
      }
      catch(NotFoundException nfe) {
        cmd.setReturnValue(nfe);
      }
      catch(NameClashException nce) {
        cmd.setReturnValue(nce);
      }
      catch(JADESecurityException ae) {
        cmd.setReturnValue(ae);
      }
      catch(ServiceException se) {
        cmd.setReturnValue(new UnreachableException("A Service Exception occurred", se));
      }

    }
View Full Code Here

Examples of org.jgroups.UnreachableException

    }

    @Override
    public <R> CommandResponse<R> executeOnNode(Command<R, C> command, Node node) {
        if (!this.node.equals(node)) {
            throw new UnreachableException((Address) null);
        }
        try {
            return new SimpleCommandResponse<>(command.execute(this.context));
        } catch (Throwable e) {
            return new SimpleCommandResponse<>(e);
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.