Examples of ServiceLoader


Examples of cascading.provider.ServiceLoader

    }

  private CatalogService loadCatalogServicePlugin()
    {
    // getServiceUtil is a private method, this allows for an impl to be loaded from an internal classloader
    ServiceLoader loader = Reflection.invokeInstanceMethod( getCascadingServices(), "getServiceUtil" );
    Properties defaultProperties = Reflection.getStaticField( getCascadingServices().getClass(), "defaultProperties" );

    return (CatalogService) loader.loadServiceFrom( defaultProperties, getProperties(), CatalogService.CATALOG_SERVICE_CLASS_PROPERTY );
    }
View Full Code Here

Examples of com.alibaba.fastjson.util.ServiceLoader

import com.alibaba.fastjson.util.ServiceLoader;


public class ServiceLoaderTest extends TestCase {
    public void test_0() throws Exception {
        new ServiceLoader();
    }
View Full Code Here

Examples of com.google.api.explorer.client.base.ServiceLoader

   */
  private ViewAndHistory createFullView(AnalyticsManager analytics) {
    // Dependencies for the UI
    AuthManager authManager = new AuthManager();
    HistoryCache historyCache = new HistoryCache();
    ServiceLoader serviceLoader = new ServiceLoader(ApiServiceFactory.INSTANCE);
    SearchResultIndex searchIndex = new SearchResultIndex();

    // Set up the keyword completion suggestion oracle.
    KeywordCompletionSuggestOracle searchKeywords = new KeywordCompletionSuggestOracle();
    searchIndex.setKeywordCallback(searchKeywords);
View Full Code Here

Examples of java.util.ServiceLoader

    protected void setUp() throws Exception
    {
        super.setUp();

        //Initialize service registry
        ServiceLoader loader = ServiceLoader.load( PojoServiceRegistryFactory.class );

        registry = ( ( PojoServiceRegistryFactory ) loader.iterator().next() ).newPojoServiceRegistry( new HashMap() );

        assertNotNull( registry );

        //Initialize bundle
        activator = new Activator();
View Full Code Here

Examples of java.util.ServiceLoader

    assertThat( descriptor.name(), is( "username" ) );
  }

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( UrlRewriteFunctionDescriptor.class );
    Iterator iterator = loader.iterator();
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof UsernameFunctionDescriptor ) {
        return;
      }
View Full Code Here

Examples of java.util.ServiceLoader

    } );
  }

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( UrlRewriteFunctionProcessor.class );
    Iterator iterator = loader.iterator();
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof UsernameFunctionProcessor ) {
        return;
      }
View Full Code Here

Examples of java.util.ServiceLoader

public class WebHCatDeploymentContributorTest {

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( ServiceDeploymentContributor.class );
    Iterator iterator = loader.iterator();
    assertThat( "Service iterator empty.", iterator.hasNext() );
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof WebHCatDeploymentContributor ) {
        return;
View Full Code Here

Examples of java.util.ServiceLoader

public class HBaseDeploymentContributorTest {

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( ServiceDeploymentContributor.class );
    Iterator iterator = loader.iterator();
    assertThat( "Service iterator empty.", iterator.hasNext() );
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof HBaseDeploymentContributor ) {
        return;
View Full Code Here

Examples of java.util.ServiceLoader

public class HBaseDispatchDeploymentContributorTest {

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( ProviderDeploymentContributor.class );
    Iterator iterator = loader.iterator();
    assertThat( "Service iterator empty.", iterator.hasNext() );
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof HBaseDispatchDeploymentContributor ) {
        return;
View Full Code Here

Examples of java.util.ServiceLoader

public class JerseyDeploymentContributorTest {

  @Test
  public void testServiceLoader() throws Exception {
    ServiceLoader loader = ServiceLoader.load( ProviderDeploymentContributor.class );
    Iterator iterator = loader.iterator();
    assertThat( "Service iterator empty.", iterator.hasNext() );
    while( iterator.hasNext() ) {
      Object object = iterator.next();
      if( object instanceof JerseyDispatchDeploymentContributor ) {
        return;
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.