Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
titleServiceDeploymentContributor.contributeService
  public void contributeService( DeploymentContext context, Service service ) throws Exception {
    String chain = null; // Default if null, otherwise specific chain name defined in topoloy.xml
    Map<String,Map<String,String>> params = null; // Default if null, otherwise map of per provider role map of name/value pairs.  
    ResourceDescriptor resource = context.addResource()
    resource.role( "WEBHDFS" );
    resource.pattern( "webhdfs/v1/?**" );
    resource.pattern( "webhdfs/v1/**?**" );
    context.contributeChain( service, resource, null, params );
  }
PlantUML
titleClasses
scale 1024 width
class DeploymentContext {
  GatewayConfig getGatewayConfig();
  Topology getTopology();
  WebArchive getWebArchive();
  WebAppDescriptor getWebAppDescriptor();
  GatewayDescriptor getGatewayDescriptor();
  <b>void contributeChain( Service service, ResourceDescriptor resource, String chainName, Map<String,Map<String,String>> providerParams )
  void contributeFilter( Service service, ResourceDescriptor resource, String role, String name, List<FilterParamDescriptor> params );
  void addDescriptor( String name, Object descriptor );
  <T> T getDescriptor( String name );
}

class ServiceDeploymentContributor {
  String getRole();
  String getName();
  void initializeContribution( DeploymentContext context );
  void contributeService( DeploymentContext context, Service service ) throws Exception;
  void finalizeContribution( DeploymentContext context );
}

...