Examples of resolve()


Examples of org.apache.hadoop.gateway.filter.rewrite.spi.UrlRewriteResolver.resolve()

    String value = parameter;
    if( function != null ) {
      UrlRewriteResolver resolver = functions.get( function );
      if( resolver != null ) {
        try {
          value = resolver.resolve( context, parameter );
        } catch( Exception e ) {
          //TODO: Proper i18n stack trace logging.
          e.printStackTrace();
          // Ignore it and use the original parameter values.
        }
View Full Code Here

Examples of org.apache.hadoop.gateway.util.urltemplate.Params.resolve()

    Template template = Parser.parse( "scheme://host:port/dir/file" );

    UrlRewriteContextImpl context = new UrlRewriteContextImpl( environment, resolver, functions, direction, template );

    Params params = context.getParameters();
    List<String> values = params.resolve( "test-env-param-name" );
    assertThat( values, notNullValue() );
    assertThat( values.size(), is( 1 ) );
    assertThat( values.get( 0 ), is( "test-env-param-value" ) );

    values = params.resolve( "test-ctx-param-name" );
View Full Code Here

Examples of org.apache.hadoop.gateway.util.urltemplate.Resolver.resolve()

    UrlRewriteEnvironment environment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
    EasyMock.expect( environment.resolve( "test-env-param-name" ) ).andReturn( Arrays.asList( "test-env-param-value" ) ).anyTimes();

    Resolver resolver = EasyMock.createNiceMock( Resolver.class );
    EasyMock.expect( resolver.resolve( "test-ctx-param-name" ) ).andReturn( Arrays.asList( "test-ctx-param-value" ) );

    EasyMock.replay( environment, resolver );

    Map<String,UrlRewriteFunctionProcessor> functions = new HashMap<String,UrlRewriteFunctionProcessor>();
View Full Code Here

Examples of org.apache.hadoop.streaming.io.IdentifierResolver.resolve()

    Class<? extends IdentifierResolver> idResolverClass =
      jobConf_.getClass("stream.io.identifier.resolver.class",
        IdentifierResolver.class, IdentifierResolver.class);
    IdentifierResolver idResolver = ReflectionUtils.newInstance(idResolverClass, jobConf_);
   
    idResolver.resolve(jobConf_.get("stream.map.input", IdentifierResolver.TEXT_ID));
    jobConf_.setClass("stream.map.input.writer.class",
      idResolver.getInputWriterClass(), InputWriter.class);
   
    idResolver.resolve(jobConf_.get("stream.reduce.input", IdentifierResolver.TEXT_ID));
    jobConf_.setClass("stream.reduce.input.writer.class",
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.ClassConstantPool.resolve()

    for (i = 0; i < cfMethods.length; i++) {
      cfMethods[i] = cp.add(new CPMethod(classBands.getMethodDescr()[classNum][i],
                    classBands.getMethodFlags()[classNum][i], classBands.getMethodAttributes()[classNum][i]));
    }
    // sort CP according to cp_All
    cp.resolve();
    // print out entries
    debug("Constant pool looks like:");
    for (i = 1; i <= cp.size(); i++) {
      debug(String.valueOf(i) + ":" + String.valueOf(cp.get(i)));
    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ClassConstantPool.resolve()

            newAttrs[newAttrs.length - 1] = innerClassesAttribute;
            classFile.attributes = newAttrs;
            cp.addWithNestedEntries(innerClassesAttribute);
        }
        // sort CP according to cp_All
        cp.resolve(this);
        // NOTE the indexOf is only valid after the cp.resolve()
        // build up remainder of file
        classFile.accessFlags = (int) classBands.getClassFlags()[classNum];
        classFile.thisClass = cp.indexOf(cfThis);
        classFile.superClass = cp.indexOf(cfSuper);
View Full Code Here

Examples of org.apache.http.conn.DnsResolver.resolve()

    @Test
    public void testCustomDnsResolver() throws Exception {
        DnsResolver dnsResolver = mock(DnsResolver.class);
        InetAddress[] firstAddress = translateIp("192.168.1.1");
        when(dnsResolver.resolve("somehost.example.com")).thenReturn(firstAddress);

        InetAddress[] secondAddress = translateIp("192.168.12.16");
        when(dnsResolver.resolve("otherhost.example.com")).thenReturn(secondAddress);

        DefaultClientConnectionOperator operator = new DefaultClientConnectionOperator(
View Full Code Here

Examples of org.apache.http.conn.SchemePortResolver.resolve()

    @Test
    public void testGetKeyWithSchemeRegistry() throws Exception {
        final SchemePortResolver schemePortResolver = Mockito.mock(SchemePortResolver.class);
        final BasicAuthCache cache = new BasicAuthCache(schemePortResolver);
        Mockito.when(schemePortResolver.resolve(new HttpHost("localhost", -1, "https"))).thenReturn(443);
        final HttpHost target = new HttpHost("localhost", 443, "https");
        Assert.assertSame(target, cache.getKey(target));
        Assert.assertEquals(target, cache.getKey(new HttpHost("localhost", -1, "https")));
    }
View Full Code Here

Examples of org.apache.ibatis.builder.ResultMapResolver.resolve()

        resultMappings.add(buildResultMappingFromContext(resultChild, typeClass, flags));
      }
    }
    ResultMapResolver resultMapResolver = new ResultMapResolver(builderAssistant, id, typeClass, extend, discriminator, resultMappings);
    try {
      return resultMapResolver.resolve();
    } catch (IncompleteResultMapException e) {
      configuration.addIncompleteResultMap(resultMapResolver);
      throw e;
    }
  }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.SqlDataClassFactory.resolve()

    public void testInterfaceLoad() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final PolyTestClass polyTestClass = SqlIntegrationTestSingleton.getStaticPolyTestClass();

        final PolyInterface loaded = polyTestClass.getPolyInterfaceType();
        factory.resolve(loaded);
        assertEquals(polyIntImpA.getString(), loaded.getString());
    }

    public void testLoadSelfReferencingCollection() {
        final PolyTestClass polyTestClass = SqlIntegrationTestSingleton.getStaticPolyTestClass();
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.