congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ServiceNotFoundException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
jadex.bridge.service.search.ServiceNotFoundException
constructor

Best Java code snippets using jadex.bridge.service.search.ServiceNotFoundException.<init> (Showing top 20 results out of 315)

origin: net.sourceforge.jadex/jadex-bridge

  public void customResultAvailable(Object result)
  {
    Collection res = (Collection)result;
    if(res==null || res.size()==0)
      exceptionOccurred(new ServiceNotFoundException("No matching service found for: "+selector));
    else
      super.customResultAvailable(res.iterator().next());
  }
});
origin: net.sourceforge.jadex/jadex-platform-base

  public void customResultAvailable(Object result)
  {
    if(result!=null && !((Collection<?>)result).isEmpty())
    {
      Object    o    = ((Collection<?>)result).iterator().next();
      ret.setResult((T)o);
    }
    else
    {
      super.exceptionOccurred(new ServiceNotFoundException("No proxy for service found: "+cid+", "+service.getName()));
    }
  }
});
origin: net.sourceforge.jadex/jadex-platform

      public void customResultAvailable(Collection<IService> result)
      {
//                System.out.println("getServiceProxy end: "+cid+" "+service.getName());
        if(result!=null && !((Collection<?>)result).isEmpty())
        {
          Object    o    = ((Collection<?>)result).iterator().next();
          ret.setResult((T)o);
        }
        else
        {
          super.exceptionOccurred(new ServiceNotFoundException("No proxy for service found: "+cid+", "+service.getName()));
        }
      }
       
origin: net.sourceforge.jadex/jadex-bridge

        public void finished()
        {
//                    if(type.getName().indexOf("IRepositoryAccess")!=-1)
//                        System.out.println("fin");
          if(!ret.isDone())
          {
            ret.setExceptionIfUndone(new ServiceNotFoundException(type.getName()));
          }
        }
         
origin: org.activecomponents.jadex/jadex-bridge

  public void customResultAvailable(Collection<IComponentFactory> facs)
  {
    facs = excludeMultiFactory(facs);
    
    if(facs!=null && facs.size()>0)
    {
      ret.setResult(facs.iterator().next());
    }
    else
    {
      ret.setException(new ServiceNotFoundException(""+filter));
    }
  }
}));
origin: org.activecomponents.jadex/jadex-platform

      public void customResultAvailable(Collection<T> result)
      {
//                System.out.println("getServiceProxy end: "+cid+" "+service.getName());
        if(result!=null && !result.isEmpty())
        {
          T o = result.iterator().next();
          ret.setResult(o);
        }
        else
        {
          super.exceptionOccurred(new ServiceNotFoundException("No proxy for service found: "+cid+", "+service.getTypeName()));
        }
      }
       
origin: org.activecomponents.jadex/jadex-bridge

  public void customResultAvailable(Void result)
  {
    ret.setExceptionIfUndone(new ServiceNotFoundException(type.getTypeName()));
  }
});
origin: org.activecomponents.jadex/jadex-bridge

public void finished()
{
  ret.setExceptionIfUndone(new ServiceNotFoundException(type.toString()));
}

origin: net.sourceforge.jadex/jadex-bridge

        public void resultAvailable(Collection<IService> result)
        {
//                    if(type.getName().indexOf("IRepositoryAccess")!=-1)
//                        System.out.println("ra: "+result);
          Collection<IService> res = (Collection<IService>)result;
          if(res==null || res.size()==0)
          {
  //					provider.getServices(getSearchManager(false, scope), getVisitDecider(true, scope), 
  //						new TypeResultSelector(type, true, RequiredServiceInfo.SCOPE_GLOBAL.equals(scope)))
  //						.addResultListener(new DefaultResultListener()
  //					{
  //						public void resultAvailable(Object result)
  //						{
  //							System.out.println("rrr: "+result);
  //						}
  //					});
            exceptionOccurred(new ServiceNotFoundException("No matching service found for type: "+type.getName()+" scope: "+scope));
          }
          else
          {
            ret.setResult(res.iterator().next());
          }
        }
         
origin: net.sourceforge.jadex/jadex-bridge

        public void resultAvailable(T result)
        {
          // If already had exception do nothing.
          // Cannot cause race conditions as the checker is called only if all tasks have been done.
          if(future.isDone())
            return;
          
//                    if(!binding.isDynamic())
          DefaultServiceFetcher.this.result = future.getIntermediateResults();
          
          if(future.getIntermediateResults().size()==0)
          {
            StoreIntermediateDelegationResultListener.this.exceptionOccurred(new ServiceNotFoundException("no results"));
          }
          else
          {
            StoreIntermediateDelegationResultListener.super.finished();
          }
        }
      });
origin: org.activecomponents.jadex/jadex-bridge

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final String scope, final IFilter<T> filter, boolean proxy)
{
  checkThreadAccess(component, proxy);
  
  T ret = SynchronizedServiceRegistry.getRegistry(component).searchService(new ClassInfo(type), component.getComponentIdentifier(), scope, filter);
  if(ret==null)
    throw new ServiceNotFoundException(type.getName());
  return proxy? createRequiredProxy(component, ret, type): ret;
}
 
origin: org.activecomponents.jadex/jadex-bridge

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final IComponentIdentifier target, boolean proxy)
{
  checkThreadAccess(component, proxy);
  T ret = SynchronizedServiceRegistry.getRegistry(component).searchService(new ClassInfo(type), component.getComponentIdentifier(), RequiredServiceInfo.SCOPE_PLATFORM, new IFilter<T>() 
  {
    public boolean filter(T obj) 
    {
      return ((IService)obj).getServiceIdentifier().getProviderId().equals(target);
    }
  });
  if(ret==null)
    throw new ServiceNotFoundException(type.getName());
  
  return proxy? createRequiredProxy(component, ret, type): ret;
}
origin: org.activecomponents.jadex/jadex-bridge

  /**
   *  Get a required services.
   *  @return The services.
   */
  public <T> ITerminableIntermediateFuture<T> getRequiredServices(String name, boolean rebind, IAsyncFilter<T> filter)
  {
//        if(shutdowned)
//            return new TerminableIntermediateFuture<T>(new ComponentTerminatedException(id));

    RequiredServiceInfo info = getRequiredServiceInfo(name);
    if(info==null)
    {
      TerminableIntermediateFuture<T> ret = new TerminableIntermediateFuture<T>();
      ret.setException(new ServiceNotFoundException(name));
      return ret;
    }
    else
    {
      RequiredServiceBinding binding = info.getDefaultBinding();//getRequiredServiceBinding(name);
      return getRequiredServices(info, binding, rebind, filter);
    }
  }
   
origin: org.activecomponents.jadex/jadex-bridge

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final String scope, final IFilter<T> filter, boolean proxy)
{
  checkThreadAccess(component, proxy);
  
  T ret = SynchronizedServiceRegistry.getRegistry(component).searchService(type, component.getComponentIdentifier(), scope, filter);
  if(ret==null)
    throw new ServiceNotFoundException(type.getTypeName());
  return proxy? createRequiredProxy(component, ret, type): ret;
}
 
origin: org.activecomponents.jadex/jadex-bridge

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final IComponentIdentifier target, boolean proxy)
{
  checkThreadAccess(component, proxy);
  T ret = SynchronizedServiceRegistry.getRegistry(component).searchService(type, component.getComponentIdentifier(), RequiredServiceInfo.SCOPE_PLATFORM, new IFilter<T>() 
  {
    public boolean filter(T obj) 
    {
      return ((IService)obj).getServiceIdentifier().getProviderId().equals(target);
    }
  });
  if(ret==null)
    throw new ServiceNotFoundException(type.getTypeName());
  
  return proxy? createRequiredProxy(component, ret, type): ret;
}
origin: org.activecomponents.jadex/jadex-bridge

  /**
   *  Get a required service.
   *  @return The service.
   */
  public <T> IFuture<T> getRequiredService(String name, boolean rebind, IAsyncFilter<T> filter)
  {
//        if(shutdowned)
//            return new Future<T>(new ComponentTerminatedException(id));
    
    RequiredServiceInfo info = getRequiredServiceInfo(name);
    if(info==null)
    {
      Future<T> ret = new Future<T>();
      ret.setException(new ServiceNotFoundException(name+" in: "+getComponent().getComponentIdentifier()));
      return ret;
    }
    else
    {
      RequiredServiceBinding binding = info.getDefaultBinding();//getRequiredServiceBinding(name);
      return getRequiredService(info, binding, rebind, filter);
    }
  }
   
origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Get a required service.
 *  @return The service.
 */
public <T> IFuture<T> getRequiredService(String name, boolean rebind, IRemoteFilter<T> filter)
{
  if(shutdowned)
    return new Future<T>(new ComponentTerminatedException(id));
  
  RequiredServiceInfo info = getRequiredServiceInfo(name);
  if(info==null)
  {
    Future<T> ret = new Future<T>();
    ret.setException(new ServiceNotFoundException(name));
    return ret;
  }
  else
  {
    RequiredServiceBinding binding = info.getDefaultBinding();//getRequiredServiceBinding(name);
    return getRequiredService(info, binding, rebind, filter);
  }
}
 
origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Get a required services.
 *  @return The services.
 */
public <T> ITerminableIntermediateFuture<T> getRequiredServices(String name, boolean rebind, IRemoteFilter<T> filter)
{
  if(shutdowned)
    return new TerminableIntermediateFuture<T>(new ComponentTerminatedException(id));
  RequiredServiceInfo info = getRequiredServiceInfo(name);
  if(info==null)
  {
    TerminableIntermediateFuture<T> ret = new TerminableIntermediateFuture<T>();
    ret.setException(new ServiceNotFoundException(name));
    return ret;
  }
  else
  {
    RequiredServiceBinding binding = info.getDefaultBinding();//getRequiredServiceBinding(name);
    return getRequiredServices(info, binding, rebind, filter);
  }
}
 
origin: org.activecomponents.jadex/jadex-bridge

ret.setException(new ServiceNotFoundException(""+type));
origin: org.activecomponents.jadex/jadex-bridge

ret.setException(new ServiceNotFoundException(""+type));
jadex.bridge.service.searchServiceNotFoundException<init>

Javadoc

Create a new service not found exception.

Popular methods of ServiceNotFoundException

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getSharedPreferences (Context)
    • onRequestPermissionsResult (Fragment)
    • getContentResolver (Context)
    • FileNotFoundException (java.io)
      Thrown when a file specified by a program cannot be found.
    • Permission (java.security)
      Legacy security code; do not use.
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • LinkedHashMap (java.util)
      LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • UUID (java.util)
      UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
    • Top 17 Free Sublime Text Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now