Package jade.core

Examples of jade.core.ServiceException


    public Node getNode() throws ServiceException {
      try {
        return NotificationService.this.getLocalNode();
      }
      catch(IMTPException imtpe) {
        throw new ServiceException("Problem in contacting the IMTP Manager", imtpe);
      }
    }
View Full Code Here


    public ClassLoader getContainerClassLoader(String codeSourceContainer, ClassLoader parent) throws ServiceException {
      try {
        return new MobileAgentClassLoader(null, codeSourceContainer, AgentMobilityService.this.myFinder, parent);
      }
      catch (IMTPException imtpe) {
        throw new ServiceException("Communication error retrieving code source container slice.", imtpe);
      }
    }
View Full Code Here

        }
        poller = new Poller(this, periodMinutes * 60000, handlers);
        poller.startPolling();
      }
      catch (Exception e) {
        throw new ServiceException("Error initializing SAMInfoHandler", e);
      }
    }
  }
View Full Code Here

    public Node getNode() throws ServiceException {
      try {
        return ResourceManagementService.this.getLocalNode();
      }
      catch(IMTPException imtpe) {
        throw new ServiceException("Error retrieving local node", imtpe);
      }
    }
View Full Code Here

      }
     
      // Get slice for specific container
      ResourceManagementSlice slice = (ResourceManagementSlice)getSlice(containerName);
      if (slice == null) {
        throw new ServiceException("getResource called with a wrong container name (" + containerName + ")");
      }
     
      // Get resource
      byte[] resource;
      try {
        try {
          resource = slice.getResource(name, fetchMode);
        }
        catch (IMTPException imtpe) {
          // Try to get a newer slice and repeat...
          slice = (ResourceManagementSlice) getFreshSlice(containerName);
          resource = slice.getResource(name, fetchMode);
        }
      } catch (NotFoundException nfe) {
        throw nfe;
      } catch (ServiceException se) {
        throw se;
      } catch (Throwable t) {
        throw new ServiceException("Error accessing resource " + name + " from " + slice.getNode().getName() + " with fetch-mode " + fetchMode, t);
      }
     
      return resource;
    }
View Full Code Here

        public Node getNode() throws ServiceException {
            try {
                return LightMessagingService.this.getLocalNode();
            } catch (IMTPException imtpe) {
                throw new ServiceException("Problem in contacting the IMTP Manager",
                    imtpe);
            }
        }
View Full Code Here

  public void boot(Profile myProfile) throws ServiceException {
    // getting the delivery channel
    try {
      MessageManager.Channel ch = (MessageManager.Channel)myServiceFinder.findService(MessagingSlice.NAME);
      if (ch == null)
        throw new ServiceException("Can't locate delivery channel");
      myManager = PersistentDeliveryManager.instance(myProfile, ch);
      myManager.start();
    }
    catch(IMTPException imtpe) {
      imtpe.printStackTrace();
      throw new ServiceException("Cannot retrieve the delivery channel",imtpe);
    }

    try {
      // Load the supplied class to filter messages if any
      String className = myProfile.getParameter(PERSISTENT_DELIVERY_FILTER, null);
      if(className != null) {
        Class c = Class.forName(className);
        messageFilter = (PersistentDeliveryFilter)c.newInstance();
        myLogger.log(Logger.INFO,"Using message filter of type "+messageFilter.getClass().getName());
      }
    }
    catch(Exception e) {
      throw new ServiceException("Exception in message filter initialization", e);
    }
  }
View Full Code Here

    public Node getNode() throws ServiceException {
      try {
        return PersistentDeliveryService.this.getLocalNode();
      }
      catch(IMTPException imtpe) {
        throw new ServiceException("Problem in contacting the IMTP Manager", imtpe);
      }
    }
View Full Code Here

            }
            myManager.storeMessage(storeName, msg, receiver);
            return true;
          }
          catch(IOException ioe) {
            throw new ServiceException("I/O Error in message storage", ioe);
          }
        }
      }
      return false;
    }
View Full Code Here

    public Node getNode() throws ServiceException {
      try {
        return AgentMobilityService.this.getLocalNode();
      }
      catch(IMTPException imtpe) {
        throw new ServiceException("Problem in contacting the IMTP Manager", imtpe);
      }
    }
View Full Code Here

TOP

Related Classes of jade.core.ServiceException

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.