Examples of GatewayServices


Examples of org.apache.hadoop.gateway.services.GatewayServices

      }
     
      systemPass= systemPass.substring( "S{ALIAS=".length(), systemPass.length() - 1 );
      String aliasName = systemPass;
     
      GatewayServices services = GatewayServer.getGatewayServices();
      AliasService aliasService = (AliasService)services.getService(GatewayServices.ALIAS_SERVICE);
     
      String clusterName = getClusterName();
      //System.err.println("FACTORY systempass 30: " + systemPass);
      //System.err.println("FACTORY clustername 40: " + clusterName);
      //System.err.println("FACTORY SystemProperty GatewayHome 50: " + System.getProperty(GatewayConfig.GATEWAY_HOME_VAR));
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

  @Override
  public void initialize( UrlRewriteEnvironment environment, HostmapFunctionDescriptor descriptor ) throws Exception {
    URL url = environment.getResource( DESCRIPTOR_DEFAULT_LOCATION );
    hostMapper = new FileBasedHostMapper( url );
    clusterName = environment.getAttributeGatewayServices.GATEWAY_CLUSTER_ATTRIBUTE );
    GatewayServices services = environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE );
    if( clusterName != null && services != null ) {
      hostMapperService = services.getService( GatewayServices.HOST_MAPPING_SERVICE );
      if( hostMapperService != null ) {
        hostMapperService.registerHostMapperForCluster( clusterName, hostMapper );
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    gatewayUrl = "http://localhost:" + gateway.getAddresses()[0].getPort() + "/" + config.getGatewayPath();
    clusterUrl = gatewayUrl + "/test-cluster";
   
    ///*
    GatewayServices services = GatewayServer.getGatewayServices();
    AliasService aliasService = (AliasService)services.getService(GatewayServices.ALIAS_SERVICE);
    aliasService.addAliasForCluster("test-cluster", "ldcSystemPassword", "guest-password");
 
    char[] password1 = aliasService.getPasswordFromAliasForCluster( "test-cluster", "ldcSystemPassword");
    //System.err.println("SETUP password 10: " + ((password1 == null) ? "NULL" : new String(password1)));
   
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    gatewayUrl = "http://localhost:" + gateway.getAddresses()[0].getPort() + "/" + config.getGatewayPath();
    clusterUrl = gatewayUrl + "/testdg-cluster";
   
    ///*
    GatewayServices services = GatewayServer.getGatewayServices();
    AliasService aliasService = (AliasService)services.getService(GatewayServices.ALIAS_SERVICE);
    aliasService.addAliasForCluster("testdg-cluster", "ldcSystemPassword", "guest-password");
 
    char[] password1 = aliasService.getPasswordFromAliasForCluster( "testdg-cluster", "ldcSystemPassword");
    //System.err.println("SETUP password 10: " + ((password1 == null) ? "NULL" : new String(password1)));
   
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    if (validityStr == null) {
      validityStr = "3600"; // 1 hr. in secs
    }
    validity = Long.parseLong(validityStr);

    GatewayServices services = (GatewayServices) filterConfig.getServletContext().getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
    authority = (JWTokenAuthority) services.getService(GatewayServices.TOKEN_SERVICE);
    sr = (ServiceRegistry) services.getService(GatewayServices.SERVICE_REGISTRY_SERVICE);
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    HostMapper hm = EasyMock.createNiceMock(HostMapper.class);
    EasyMock.expect( hm.resolveInboundHostName("test-inbound-host")).andReturn( "test-inbound-rewritten-host" ).anyTimes();
   
    HostMapperService hms = EasyMock.createNiceMock( HostMapperService.class );

    GatewayServices gatewayServices = EasyMock.createNiceMock( GatewayServices.class );
    EasyMock.expect( gatewayServices.getService( GatewayServices.HOST_MAPPING_SERVICE ) ).andReturn( hms ).anyTimes();


    UrlRewriteEnvironment environment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
    EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();   
    EasyMock.expect( environment.resolve( "cluster.name" ) ).andReturn( Arrays.asList( "test-cluster-name" ) ).anyTimes();
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    AliasService as = EasyMock.createNiceMock( AliasService.class );
    CryptoService cryptoService = new DefaultCryptoService();
    ((DefaultCryptoService)cryptoService).setAliasService( as );

    GatewayServices gatewayServices = EasyMock.createNiceMock( GatewayServices.class );
    EasyMock.expect( gatewayServices.getService( GatewayServices.CRYPTO_SERVICE ) ).andReturn( cryptoService ).anyTimes();

    ShiroDeploymentContributor contributor = new ShiroDeploymentContributor();

    assertThat( contributor.getRole(), is( "authentication" ) );
    assertThat( contributor.getName(), is( "ShiroProvider" ) );
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

 
  private JWTokenAuthority authority = null;

  @Override
  public void init( FilterConfig filterConfig ) throws ServletException {
    GatewayServices services = (GatewayServices) filterConfig.getServletContext().getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
    authority = (JWTokenAuthority) services.getService(GatewayServices.TOKEN_SERVICE);
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

    if (validityStr == null) {
      validityStr = "3600"; // 1 hr. in secs
    }
//    validity = Long.parseLong(validityStr);

    GatewayServices services = (GatewayServices) filterConfig.getServletContext().getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
    authority = (JWTokenAuthority) services.getService(GatewayServices.TOKEN_SERVICE);
    sr = (ServiceRegistry) services.getService(GatewayServices.SERVICE_REGISTRY_SERVICE);
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.services.GatewayServices

 
  private JWTokenAuthority authority;
 
  @Override
  public void init( FilterConfig filterConfig ) throws ServletException {
    GatewayServices services = (GatewayServices) filterConfig.getServletContext().getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
    authority = (JWTokenAuthority) services.getService(GatewayServices.TOKEN_SERVICE);
  }
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.