Package org.apache.hadoop.gateway.hostmap.api

Examples of org.apache.hadoop.gateway.hostmap.api.HostmapFunctionDescriptor.config()


        HostmapFunctionDescriptor func = rules.addFunction( HostmapFunctionDescriptor.FUNCTION_NAME );
        if( func != null ) {
          Asset asset = createAsset( provider );
          context.getWebArchive().addAsWebInfResource(
              asset, HostmapFunctionProcessor.DESCRIPTOR_DEFAULT_FILE_NAME );
          func.config( HostmapFunctionProcessor.DESCRIPTOR_DEFAULT_LOCATION );
        }
      }
    }
  }
View Full Code Here


    contributor.initializeContribution( context );

    contributor.contributeProvider( context, provider );

    HostmapFunctionDescriptor funcDesc = rewriteRules.getFunction( "hostmap" );
    assertThat( funcDesc.config(), is( "/WEB-INF/hostmap.txt" ) );

    Node node = webArchive.get( "/WEB-INF/hostmap.txt" );
    String asset = IOUtils.toString( node.getAsset().openStream() );
    assertThat( asset, containsString( "test-host-external=test-host-internal" ) );
View Full Code Here

        HostmapFunctionDescriptor func = rules.addFunction( HostmapFunctionDescriptor.FUNCTION_NAME );
        if( func != null ) {
          Asset asset = createAsset( provider );
          context.getWebArchive().addAsWebInfResource(
              asset, HostmapFunctionProcessor.DESCRIPTOR_DEFAULT_FILE_NAME );
          func.config( HostmapFunctionProcessor.DESCRIPTOR_DEFAULT_LOCATION );
        }
      }
    }
  }
View Full Code Here

    contributor.initializeContribution( context );

    contributor.contributeProvider( context, provider );

    HostmapFunctionDescriptor funcDesc = rewriteRules.getFunction( "hostmap" );
    assertThat( funcDesc.config(), is( "/WEB-INF/hostmap.txt" ) );

    Node node = webArchive.get( "/WEB-INF/hostmap.txt" );
    String asset = IOUtils.toString( node.getAsset().openStream() );
    assertThat( asset, containsString( "test-host-external=test-host-internal" ) );
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.