Versions Compared

Key

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

...

Code Block
xml
xml
titleTopology
linenumberstrue
<topology>
  <gateway>
    <provider>
      <role>authentication</role>
      <name>default</name>
      <enabled>true</enabled>
      <param>
        <name>filterClassName</name>
        <value>org.opensource.filters.ExistingFilter</value>
      </param>
    </provider>
    ...
  </gateway>
  ...
</topology>

...

Code Block
java
java
titleDefaultProviderDeploymentContributor
linenumberstrue
public class DefaultProviderDeploymentContributor {

  String getRole() {
    return "*";

  String getName() {
    return "default";
  }

  void initializeContribution( DeploymentContext context ) {
    // NoOp
  }

  void contributeProvider( DeploymentContext context, Provider provider ) {
    // NoOp
  }

  void contributeFilter(
      DeploymentContext context,
      Provider provider,
      Service service,
      ResourceDescriptor resource,
      List<FilterParamDescriptor> params ) {
    resource.addFilter()
        .name( getName() )
        .role( provider.getRole() )
        .impl( provider.getParams().get( "filterClassName" TODO) )
        .params( params );
  }

  void finalizeContribution( DeploymentContext context ) {
    // NoOp
  }
}